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


Test-DbaPowerPlan

This command checks SQL Server Power Plan, which Best Practices recommends should be set to High Performance. It returns $true or $false by default for one server. Returns Server name and IsBestPractice for more than one server.

Screenshots

Test-DbaPowerPlan

Examples

To return true or false for Power Plan being set to High Performance

Test-DbaPowerPlan -ComputerName sqlserver2014a

To return true or false for Power Plan being set to the custom power plan called Maximum Performance

Test-DbaPowerPlan -ComputerName sqlserver2014a -CustomPowerPlan ‘Maximum Performance’

To return detailed information Power Plans

Test-DbaPowerPlan -ComputerName sqlserver2014a -Detailed

References

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

Windows Power Plan Effects on Newer Intel Processors by Glenn Berry

Get-Help

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

Source Code

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

Related commands