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

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Export-DbaSpConfigure

This command exports advanced sp_configure global configuration options in SQL format to a file.

Examples

To export sp_configure values in SQL format to C:\temp\sp_configure.sql using integrated (Windows) authentication to login to the server

 

To export sp_configure values in SQL format to C:\temp\sp_configure.sql using SQL authentication to login to the server (you will be prompted for sqladmin’s password)

 

Get-Help

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

Source Code

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

Related commands