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


This command copies configuration values (sp_configure) from one SQL Server to another. By default, all configuration values are copied.

The -Configs parameter is autopopulated for command-line completion and can be used to copy only specific configs.


To copy all sp_configure settings from sqlserver2014a to sqlcluster using integrated (Windows) authentication

To update the values for two configs, the IsSqlClrEnabled and DefaultBackupCompression, from sqlserver2014a to sqlcluster, using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster

To see what would happen if the command were executed

From PowerShell, execute   Get-Help Copy-SqlSpConfigure -Detailed   for more information on this function. Want to see the source code? See it on GitHub