The following post was contributed by Benjamin Rampe a Senior PFE working for Microsoft.

While studying up on Windows 10, I came across a technique that has been shown to reduce the time it takes to apply an OS WIM to disk by 20 – 50%*.  That’s a fairly significant savings in time and the implementation of this technique is relatively easy and does not require you to change how you deploy Windows.  Believe it or not, the savings come from adjusting the OS power management settings during a deployment.  While there are multiple ways to implement these power management settings, below I’ve outlined what I consider the most non-intrusive to existing deployment methods. 

Steps:

1. Copy PowerCfg.exe binaries to MDT Files package’s Scripts subfolder

  • By default, WinPE runs with the power management scheme set to “Balanced”
  • ConfigMgr 2012 R2’s boot images use WinPE v5.0 which is based on the Windows 8.1 OS
  • PowerCfg.exe is necessary for changing the power management scheme
  • PowerCfg.exe is not included in WinPE
  • Create subfolders in the MDT Files package’s Scripts subfolder for each architecture, as shown below:

             clip_image001

  • From a system running Windows 8.1 (or Server 2012 R2) copy %WINDIR%\System32\PowerCfg.exe to the AMD64 folder in the MDT Files package Scripts folder
  • From a system running Windows 8.1 (or Server 2012 R2) copy %WINDIR%\SysWOW64\PowerCfg.exe to the i386 folder in the MDT Files package Scripts folder
  • Update distribution points for the MDT Files package

2. Insert a step early in the task sequence to set the power management scheme to “High performance”

  • The GUID for the High performance scheme is “8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c”
  • The GUIDs for the default power management schemes in Windows are consistent between Windows versions (Vista and later)
  • The first instance of this action is for setting the power scheme during a REFRESH scenario (which starts in the full/old Windows OS).  In this scenario, we want to execute the PowerCfg.exe native binary included in the OS (not the version in the MDT Files package).  The Command line for this instance should be:  “PowerCfg.exe /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c”.  To ensure this action only runs during a REFRESH scenario, the condition on this step should be “_SMSTSInWinPE not equals TRUE”
  • The second instance of this action is for setting the power scheme during a NEW COMPUTER scenario (which starts in WinPE).  In this scenario, we want to execute the PowerCfg.exe binary included in the MDT Files package.  The Command line for this instance should be:  “"%DeployRoot%\Scripts\%PROCESSOR_ARCHITECTURE%\PowerCfg.exe" /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c”.  To ensure this action only runs during a NEW COMPUTER scenario, the condition on this step should be “_SMSTSInWinPE equals TRUE”
  • The example below leverages the MDT-specific variable %DeployRoot% which gets instantiated only after a “Use Toolkit Package”, so be sure to insert the step to change the power scheme after the first “Use Toolkit Package” as shown below:

             clip_image003

3. After every “Restart Computer” step within the Preinstall, Install, and Post Install phases, insert another action to reset the power management scheme to “High performance” using the PowerCfg.exe from the MDT Files package.  These 3 phases all run under WinPE which does not persist the power scheme between reboots.  For example:

             clip_image005

4. After the first “Restart Computer” step within the State Restore phase, insert another action to reset the power management scheme to “High performance” using PowerCfg.exe from the native (full) Windows OS as shown below.  (NOTE:  Perhaps a better alternative to implementing this step would be to set the power scheme to High performance prior to image capture which would provide the added benefit of using the High performance scheme during PnP enumeration, driver installation, etc.):

            clip_image002

5. Finally, set the power management scheme to the scheme you wish for the system to use after the deployment.  In the example below, the GUID for the Balanced power scheme is set.  GUIDs for the built-in power schemes in Windows can be found here.  To set the GUID for any custom scheme, use “PowerCfg.exe –L” to obtain the scheme’s GUID and paste into the Command line for the action: 

            clip_image011

Early results are very promising using this technique, we would love to hear if this improved the speed of your deployment via the comments.

*From Windows 10 for PCs and 2 in 1s Manufacturing End-to-End Overview – http://channel9.msdn.com/Events/WinHEC/2015/WDI201

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use.


The Deployment Guys

{ Comments on this entry are closed }

VSSTester script updated – troubleshoot Exchange 2013 and 2010 database backups

March 27, 2015

It’s been a while since we talked about VSSTester script! Murali, who maintained the script before, asked me to take over the script maintenance and thus I’m releasing this updated version. This script update is long overdue but better late than never! As before, you can grab a copy of the script from here. What’s […]

Read the full article →

Announcing RemoteApp availability in Australia

March 27, 2015

My name is Nihar Namjoshi from the Remote Desktop team. We made Azure RemoteApp generally available across thirteen Azure regions worldwide in December 2014. The response has been terrific in the regions we launched in, but we heard from customers that they really needed the ability to deploy Azure RemoteApp in Australia. I’m happy to […]

Read the full article →

Support Tip: Consistency Check fails with “DPM encountered a retryable VSS error”

March 27, 2015

Hi everyone, Dwayne Jackson here with another tip for you in case you ever run into an issue where a consistency check in System Center 2012 Data Protection Manager (DPM 2012 or DPM 2012 R2) fails for an Exchange database in a non-clustered configuration with the symptoms below. SYMPTOMS 1. The consistency check job displays […]

Read the full article →

DsQuerySitesByCost and public folder referrals

March 26, 2015

In Exchange 2010 and older, when you mount a public folder database, the Information Store service asks Active Directory for the costs from this site to every other site that contains a public folder database. This is repeated about every hour in order…(read more) Bill Long’s Exchange Blog

Read the full article →

Thomas LaRock Invites You to Attend the PASS Business Analytics Conference 2015

March 25, 2015

This is a guest blog post from Thomas LaRock, the President of PASS (Professional Association for SQL Server) It’s no secret that the role of data in the IT industry, in business, and in the world at large is changing at a rapid pace. As technology continues to become a more integrated and integral part […]

Read the full article →

Fear of Apple

March 25, 2015

There is an unfortunate climate of fear in the software community today. It is primarily in ephemeral video interviews and podcasts that we get any semblance of coherent criticism and even then it is reticent. Worse than the fact that this criticism is relegated to verbal discussions is that it is later renounced by the […]

Read the full article →

KB: “The system cannot find the file specified” error when you use Data Protection Manager to restore DPMDB.bak

March 25, 2015

When you run the C:>DpmSync.exe –restoredb –dbloc command line to restore the DPMDB.bak file, the operation fails with the following error: Unhandled Exception: Microsoft.SqlServer.Management.Smo.FailedOperationException: Restore failed for Server <DPMDBName>. —> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. —> System.Data.SqlClient.SqlException: Directory lookup for the file "<D:\Microsoft System Center 2012\DPMDB\MSDPM2012$ DPMDB.mdf>" failed with […]

Read the full article →

Apple Patents A Light-Splitting iPhone Camera Sensor System

March 24, 2015

 Apple has secured a new patent (via AppleInsider) for a special three sensor camera designed for thin, wireless devices like the iPhone. The three sensors would each capture a separate color component, as divided by a special light-splitting cube that would divide up light entering the camera into red, green and blue (or other color […]

Read the full article →

Enterprise Remote Control Update

March 24, 2015

We just released an update to our Enterprise Remote Control. It updates OpenSSL to address this denial of service vulnerability: https://www.openssl.org/news/secadv_20150319.txt The issue would allow someone to send a special crafted back to crash the openssl library, and deny access until you restart the service. Due to the number of problems found in OpenSSL, we […]

Read the full article →