Author | Chrissy LeMaire (@cl), netnerds.net |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Get-DbaPowerPlan on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaPowerPlan.
Gets the Power Plan settings for compliance with best practices, which recommend High Performance for SQL Server.
Gets the Power Plan settings on a computer against best practices recommendations.
To display all available Power Plans on a computer, use the parameter List.
Get-DbaPowerPlan
[-ComputerName] <DbaInstanceParameter[]>
[[-Credential] <PSCredential>]
[-List]
[-EnableException]
[<CommonParameters>]
PS C:\> Get-DbaPowerPlan -ComputerName sql2017
Gets the Power Plan settings for sql2017
PS C:\> Get-DbaPowerPlan -ComputerName sql2017 -Credential ad\admin
Gets the Power Plan settings for sql2017 using an alternative credential
PS C:\> Get-DbaPowerPlan -ComputerName sql2017 -List
Gets all available Power Plans on sql2017
The server(s) to check Power Plan settings on.
Alias | |
Required | True |
Pipeline | true (ByValue) |
Default Value |
Specifies a PSCredential object to use in authenticating to the server(s), instead of the current user account.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Return all available Power Plans.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |