Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the twentyseventeen domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wp-includes/functions.php on line 6121 CMD – SCCMOG – Deployment Blog
In this blog I will show you how to inject your Windows 10 start menu offline so that on first boot its already configured in your reference image or even your deployment task sequence whether that be MDT of ConfigMgr (SCCM).
Note: If you have links for icons pinned on the taskbar and the software is not already installed it ill not break and they will show as the applications are installed 😉
Important: Make sure you have added the PowerShell component to your boot image. Click a link to find out how: MDT or SCCM
MDT Setup
First download the script and save it into you deployment share “Scripts” folder:
Your welcome to also download the DefaultStart.xml and or just rename your default start menu XML to “DefaultStart.xml” and add it also to the deployment share “Scripts” folder.
Then open up your chosen Task Sequence in MDT and just before the “Inject Drivers” step under the “Post Install Group” and a new “Run Commmand Line Step”.
Name it for example: Inject Start Menu Offline
Then use the following command line:
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 “Action-OSD_InjectStartMenu_Offline.ps1” into it. And then your welcome to also download the DefaultStart.xml or just rename your default start menu XML to “DefaultStart.xml” and add it also to the ToolKit Package “Scripts” foldera also.
Now, update the Package in ConfigMgr.
Next we need to add the step to the task sequence. It must go after a “Use Toolkit Package” step and before your Driver injection step in the task sequence. (If you have a reboot remember to add another use “Toolkit package”.)
Create a new “Run Command Line Step” and the below command.
So currently I am working on an Government Education site comprising of just under 40 schools. There was a requirement to remove/hide Microsoft’s Edge browser from the image being rolled out to the users. The reasoning behind this is down to a monitoring tool used by the education department that does not support Edge and therefor policies would be broken…
Anyway I hunted around on our favourite resource for a solution that would not break the image entirely by removing one of it core features.
Eventually I found these 4 registry keys that did the trick:
Next was to figure out how to inject these into my reference image before it was laid onto the VM for automated customisation. So I remembered a great script by Johan Arwidmark I use all the time for turning off Appx package updates during a reference image capture task sequence (can break sysprep if allowed).
Anyway after a bit of modification to load the Software registry hive offline instead this is what I came up with. There is also some commented out portions here that may come in handy:
Then Open up your chosen Task Sequence in MDT and just before the “Inject Drivers” step under the “Post Install Group” and a new “Run Commmand Line Step”.
Name it for example: Configure User Experience
Then use the following command line:
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 “Config-Win10-Offline-UE.wsf” into it. Now, update the Package in ConfigMgr.
Next we need to add the step to the task sequence. It must go after a “Use Toolkit Package” step and before your Driver injection step in the task sequence. (If you have a reboot remember to add another use “Toolkit package”.)
Create a new “Run Command Line Step” and add the below command.
Ok so I’m sure like a lot of people out there we all love those scripts that Johan Arwidmark, Mikael Nystrom, Peter Löfgren and all the other MVPs write that make our lives easier!
The beauty of adding this to your boot image is the point at which you are then able to remote control a task sequence, you can literally remote control the machine being built before the DP password has been entered, allowing the ConfigMgr Admin(s) to easily troubleshoot an issue.
I want to make it clear that the original script was created by Johan and without his work I would not have come up with this. What I have done (having a spare Saturday) is tweak it a little to take parameters and configure it all. This means you do not have to open any files to change any information 🙂 I even update the XML for you, install Dart, the works!
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:
"%ScriptRoot%\Set-PowerCFG.wsf" /High
"%ScriptRoot%\Set-PowerCFG.wsf" /Bal
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.