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:



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.