Server.Configuration Server.Configuration Server.Configuration Property


Gets the configuration options for the instance of SQL Server.

 property Microsoft::SqlServer::Management::Smo::Configuration ^ Configuration { Microsoft::SqlServer::Management::Smo::Configuration ^ get(); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcObject(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcObjectRelationship.ChildObject, Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcObjectCardinality.One)]
public Microsoft.SqlServer.Management.Smo.Configuration Configuration { get; }
Public ReadOnly Property Configuration As Configuration
Property Value

A Configuration object that specifies the configuration options for the instance of SQL Server.


Visual Basic


$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")  
#Display all the configuration options  
Foreach ($p in $srv.Configuration.Properties)  
   Write-Host $p.DisplayName  
Write-Host "There are" $srv.Configuration.Properties.Count "configuration options."  
$min = $srv.Configuration.ShowAdvancedOptions.Minimum  
$max = $srv.Configuration.ShowAdvancedOptions.Maximum  
Write-Host "Minimum and Maximum values are" $min "and" $max"."  
$srv.Configuration.ShowAdvancedOptions.ConfigValue = 0  
if ($srv.Configuration.ShowAdvancedOptions.IsDynamic -eq $TRUE)  
   Write-Host "Configuration option has been updated."  
   Write-Host "Configuration option will be updated when SQL Server is restarted."  


The Configuration property points to the Configuration object, which has a property for each configurable server setting, such as FillFactor and NestedTriggers. Each property points to a ConfigProperty object that contains the maximum value, minimum value, and run value of the server setting. It also tells you whether the server setting is advanced and whether it is dynamic. The server settings can be modified by setting the properties of the ConfigProperty object. If the server setting is not dynamic, you must also restart the system.

Applies to