0

Using PowerCfg To Set Server Power Plan From Command Line

Being able to automate and set Power Plan options via the command is useful for both automation and tasks on Server Core.  We can use powercfg.exe to control power plans - also called power schemes - to use the available sleep states, to control the power states of individual devices, and to analyze the system for common energy-efficiency and battery-life problems.

Below are multiple examples of the use of PowerCfg.exe to view, modify and assign a Power Plan.

Show All Defined Power Plans

Powercfg.exe /List

Powerfg To List Power Plans

Show Currently Active Power Plan

Powercfg.exe /GetActiveScheme

Powerfg Show Active Power Plan

Assign Power Plan

We can use the /Setactive option to assign a particular power plan.  However there is a small catch.

You need to use the GUID as the power plan name is not considered valid.  This error is shown in the screenshot below.

The assignment works correctly when the power plan’s GUID is used.

Powercfg.exe /SetActive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

Powerfg Assign Power Plan

Then we can query the current power plan to ensure that the high performance plan is now active:

Verify Power Plan Changed

Cheers,

Rhoderick

Rhoderick Milne [MSFT]

Leave a Reply

Your email address will not be published. Required fields are marked *