dbatools is a free PowerShell module with over 180 SQL Server administration, best practice and migration commands included.


Get-DbaSpConfigure

This function returns server level system configuration (sys.configuration/sp_configure) information. The information is gathered through SMO Configuration.Properties.

The data includes the default value for each configuration, for quick identification of values that may have been changed.

Screenshots

Examples

To return server level configuration data on the localhost (ServerName, ConfigName, DisplayName, Description, IsAdvanced, IsDynamic, MinValue, MaxValue, ConfiguredValue, RunningValue, DefaultValue, IsRunningDefaultValue)

Get-DbaSpConfigure -SqlServer localhost

To return system configuration information on multiple instances piped into the function

‘localhost’,’localhost\namedinstance’ | Get-DbaSpConfigure

To return only the system configuration for MaxServerMemory and MinServerMemory. Configs is autopopulated for tabbing convenience.

Get-DbaSpConfigure -SqlServer sql2012 -Configs MaxServerMemory, MinServerMemory

To compare two server configs

Author

This command was created by Nicholas Cain, SQL Server MCM. You can find Nic on Twitter and his blog.

Get-Help

From PowerShell, execute Get-Help Get-DbaSpConfigure -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaSpConfigure.ps1 on GitHub
 

Related commands