dbatools is a free PowerShell module with over 300 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


This command sets the SQL Server OS’s Power Plan. It defaults to High Performance which is Best Practice.

If your organization uses a custom power plan that is considered best practice, specify -CustomPowerPlan.




To set the Power Plan to High Performance on server sqlserver2014a

Set-DbaPowerPlan -ComputerName sqlserver2014a

To set the Power Plan to the custom power plan called “Maximum Performance”. Skips it if its already set.

Set-DbaPowerPlan -ComputerName sqlcluster -CustomPowerPlan ‘Maximum Performance’


Slow Performance on Windows Server when using the “Balanced” Power Plan

Windows Power Plan Effects on Newer Intel Processors by Glenn Berry


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

Source Code

Want to see the source code? View Set-DbaPowerPlan.ps1 on GitHub

Related commands