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


Copy-DbaResourceGovernor

Migrates Resource Pools. By default, all non-system resource pools are migrated.

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

If the pool already exists on the destination, it will be skipped unless -Force is specified. Force drops and recreates the object.

Examples

To copy all resource pools from sqlserver2014a to sqlcluster, using Windows credentials.

 

To copy all policies and conditions from sqlserver2014a to sqlcluster, using SQL credentials for sqlserver2014a and Windows credentials for sqlcluster.

 

To copy only one pool, mahpool, from sqlserver2014a to sqlcluster.

 

To show what would happen if the command were executed. This does not perform any actions.

 

Get-Help

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

Source Code

Want to see the source code? View Copy-DbaResourceGovernor.ps1 on GitHub
 

Related commands