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


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