Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Server.Configuration Property


Gets the configuration options for the instance of SQL Server.

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

[SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.One)]
public Configuration Configuration { get; }

Property Value

Type: Microsoft.SqlServer.Management.Smo.Configuration

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

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.

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."
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft