--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools



Would you like to sponsor this site?
Or buy me a beer?:

Recently Changed Pages:

View All Pages
View All Q Pages

View All Tags

Sign up for Q to post comments.

WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.

Terms And Conditions for Q users

Pages with comments

2019/06/22 10:36 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 3 Comments
2017/04/20 15:28 1 Comment
2017/04/20 15:23 1 Comment
2017/04/19 14:44 1 Comment
2017/04/17 20:10 1 Comment
2017/04/17 20:07 1 Comment
2017/04/17 19:58 1 Comment
2017/04/17 19:52 1 Comment

View All Comments


Windows PowerPlan

The windows powerplan is set to balanced by default in Windows Server 2008/R2, but that could seriously impact performance. And, because idle CPUs in virtual environments don't use much power anyway, especially in virtual environments, it could be better to change this setting to High Performance:

  • Go to the Control Panel → Hardware → Choose a power plan
  • Click on “Change settings that are currently unavailable”
  • Set to “High Performance”

Getting the PowerPlan for Windows with PowerShell

If you want to know the powerplan your servers are running you can use this powershell script:

# Source
Function Get-PowerPlan ($Computer)
    # Grab the windows version so we know whether to query for the power plan or not
    $winver = gwmi -Class win32_OperatingSystem -ComputerName $Computer
        # Version 6x is Win7/2008 powerplan not relevant below that
        if ($winver.Version.substring(0,1) -gt 5)
            $plan = Get-WmiObject -Class win32_Powerplan -Computername $Computer -Namespace root\cimv2\power -Filter "isActive='true'"
            $regex = [regex]"{(.*?)}$"
            $planGuid = $regex.Match($plan.instanceID.Tostring()).groups[1].value
            $PlanType = powercfg -query $planGuid
            # Grab just the first record which has the actual plan being used
            # From that record just grab the actual plan type which is enclosed in parenthesis
            $PlanType = $PlanType[0].Substring($PlanType[0].LastIndexOf("(")+1) -replace "\)", ""
            # If the plan isn't high performance let's make it stand out
            if ($PlanType -ne "High performance") { Write-Host $Computer":" $PlanType.ToUpper() -foregroundcolor "Red" }
            else {  Write-Host $Computer":" $PlanType -foregroundcolor "Green" }
            # If the Windows version doesn't support power plans just let us know
            Write-Host $Computer": n/a"
#Based upon a list of machines contained in c:\temp\serverlist.txt
get-content C:\temp\serverlist.txt | %  {  Get-PowerPlan $_ ; }

Note that, if you want to change the powerplan right away the command should be this (works with GUID):

powercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

And manually query would be:

C:\Users\sjoerd>powercfg -getactivescheme
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  (High performance)

Set the PowerPlan through policies

Open gpedit.msc and go to Administrative templates → System → Power management and doubleclick the “Select an Active Power Plan”. Enable the policy and select the high performance policy. Save your changes.
See here on how to create an GPO for your domain so you can set the policy for all of your servers.


You could leave a comment if you were logged in.
windowspowerplan.txt · Last modified: 2013/04/20 10:15 by sjoerd