OSD Task Seqeunce High Performance – Native PowerCFG – VBS – MDT -SCCM

So like a lot of ConfigMgr Admins out there I strive to produce the fastest and most robust task sequences I can. This obviously led me down the path of configuring the Power Settings on the OS during deployment and capture phases.

The issue that I found is probably like many of you have and that is that it requires exporting the native “PowerCFG.exe” from each version of the OS that you would like to dynamically change the power configuration during Operating System Deployment.

So Jack and I were discussing why… in short… do we not use the “PowerCFG.exe” that is is already in the OS that we are configuring. Anyway after a little persuasion we came up with this little beauty of a script. This script will also create a CMTrace “Log”ย  using its name in the Log folder that is currently in use in the Task sequence.

Setup is simple:

MDT Setup
  • For MDT just place it into the Scripts folder of you “Deployment Share”.”
  • You can then call this during any stage of you Reference image capture i.e. WinPE or full OS phase to set the power cfg with these below Command Lines:

SCCM Setup
  • For SCCM you must be using the MDT integration (if you’re not… Start now!), you can make it work without it but I will not cover that here.
  • Find your current MDT Toolkit Package that is associated with the Task Sequence you would like to configure power settings in.
  • Open the “Source” location of your toolkit package, then open the scripts folder.

  • Once inside the scripts folder copy the “Set-PowerCFG.wsf” into it.

    • Now, update the Package in ConfigMgr.
    • Next we need to add the step to the task sequence. It must go after the “Use Toolkit Package” step in the task sequence. (If you have a reboot and remember to add another use “Toolkit package”.)
    • Create a new “Run Command Line Step” and add one of the below commands.

And that is it. Your Task sequence will now set the Power Configuration Profile using the current OS’s native “Powercfg.exe”

Anyway as always, script is provided as is and if you do mod it, there is a line to add your name.

The Script:



6 Replies to “OSD Task Seqeunce High Performance – Native PowerCFG – VBS – MDT -SCCM”

  1. Thank you for this. Now you say that this will work whether in WinPE or Windows, but if I recall, there is no powercfg.exe in WinPE.

  2. At what points in the task sequence should be be executed for best results.

    Does this need to enabled again after each reboot or will it hold the settings until its set back later in the task.

    1. Hi Brian,

      As WinPE does not hold changes on reboot, if you are rebooting, for example BIOS upgrades or BIOS to UEFI, then it must be rerun after every reboot.
      The next stage would be after the ConfigMgr Client setup task.
      But remember this can also be used while capturing the image (MDT), this will mean that the image is captured in High performance mode and during the Windows setup phase (Setting up devices) this will also run in high performance mode as this portion is set to balanced by default.

      Hope that helps.

Leave a Reply

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


This site uses Akismet to reduce spam. Learn how your comment data is processed.