commands

^

Get-DbaPowerPlan

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.

Synopsis

Gets the Power Plan settings for compliance with best practices, which recommend High Performance for SQL Server.

Description

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.

Syntax

Get-DbaPowerPlan
    [-ComputerName] <DbaInstanceParameter[]>
    [[-Credential] <PSCredential>]
    [-List]
    [-EnableException]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Get-DbaPowerPlan -ComputerName sql2017

Gets the Power Plan settings for sql2017

Example: 2
PS C:\> Get-DbaPowerPlan -ComputerName sql2017 -Credential ad\admin

Gets the Power Plan settings for sql2017 using an alternative credential

Example: 3
PS C:\> Get-DbaPowerPlan -ComputerName sql2017 -List

Gets all available Power Plans on sql2017

Required Parameters

-ComputerName

The server(s) to check Power Plan settings on.

Alias
Required True
Pipeline true (ByValue)
Default Value

Optional Parameters

-Credential

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
-List

Return all available Power Plans.

Alias
Required False
Pipeline false
Default Value False
-EnableException

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