CCMEXEC.COM – System Center blog

CCMEXEC.COM – by Jörgen Nilsson

I should have written this post a while ago but haven’t had time yet. When using the new BIOS-UEFI conversion solution in Configuration Manager 1610, If you are still on 1606 or earlier you can still use this method:

I have seen the below error 0×80070490 when the computer tries to restart the first time after the OEM tools are used to convert from BIOS-UEFI, it has been different reasons behind it.

Error code

Let’s start with what is new behind the scenes, the reason this wasn’t possible before is that the restart computer step checked that the partitioning matches the Booted Operating System, so if we booted in Legacy BIOS it checks that the partitions are correct otherwise it fails, this is overridden with the new variable used for the UEFI partition, “TSUEFIDrive”.


There are new files in the boot images that makes this possible, “BCD-EFI-64” in the x64 Boot image and “BCD-EFI-32” in the x86 boot image. This file is required and used when the computer restarts the first time from booted after conversion to UEFI is done. They are in the OSDinjection.xml file so they are added to the boot image when they are created.


And that is exactly what is causing the above error at least from what I have seen it could probably be more reasons for it to fail but the two reasons I have seen are the following

1. The Boot image used are not updated since the upgrade to Configuration Manager 1610. In that case the new file is not present in the boot image and the restart will fail.

Boot Image updated

Solution: Simply update the boot images on the DP, then the needed file is added to it.

2. If you have modified the OSDinjection.xml file manually after 10/26/2016 then the file is newer than the osdinjection.xml that is included with the Configuration Manager 1610 upgrade, and then the upgrade process will NOT replace the osdinjection.xml file. Also causing the same error as above.


Solution: This can be solved by either adding the missing lines for the new files in the osdinjection.xml file or copy it from the following path:            <ConfigurationManagerinstalldir>\EasySetupPayload\c43a89e4-b642-4fc8-abf0-255bf5d88d82\SMSSETUP\BIN\X64 if you haven’t made any modifications to it.

And then update the boot images after that.

Every time I have seen that error it has because one of the above and it has solved the issue for me every time :D

There is some post and forum posts stating that you must upgrade to ADK 1607 for it to work, that is not the case from what I have seen. It could solve the issue though as you will create new or update existing boot images and then the new files are added.

There are some issues in ADK 1607, driver installation on Windows 7 and 802.1x support for instance so some will still need to use ADK 1511 and it works just fine.

After playing around a while with Configuration Manager 1701 Technical Preview build I thought it was time to share some info and some nice screenshots.

The biggest new feature without competition is the fact that SCCM clients will now select Software Update point using Boundary Groups just like it would with an MP, DP … This is awesome news as it replaces the random selection a client does today! Right now there are some limitations to it in the Technical Preview, all information about what is included in 1701 Technical Preview can be found here:

Software update points and Boundary Groups improvements

A look a the new setting for SUP fallback in the Boundary Groups, it is not fully implemented yet in the Technical Preview.. but it looks nice! New clients will use the SUP assigned to the in the Boundary Group but existing clients will use the one that has been selected randomly until it fails to contact it. Something to keep in mind when implementing it if that is how it will work when it is released.

Boundary Group SUP

Hardware inventory now inventories UEFI information

UEFI is extremely important for all new security features in Windows 10 and going forward. In 1701 Hardware Inventory now inventories UEFI information as well. A Dashboard as well that shows Credential Guard, Device Guard state would be great as well. Configuration Item for it works just fine.. but if I could wish.

UEFI Inventory

UEFI Inventory_1

Improvements in Operating System deployment

There are many small but great updates to the Task Sequence as well, updates to Standalone Media, expiration dates, additional content.

In the task Sequence editor we can now multi select applications and instead of a maximum of 9 applications per step it is now possible to add 99.


All steps in a Task Sequence that reference a package, driver package, application and so on will have it packageID/applicationID shown as well. making it much easier to find and troubleshoot, an example would be the Setup Windows and Configuration Manager step.


Validate device health attestation data via management points

We can now configure our Management Points with a list of On-Premise Device Health attestation points it should use to report device health. Device health attestation is not the most used feature as far as I know but it will be when we get rid of all the “old” hardware that doesn’t support TPM 2.0 for instance.

MP device helath

Host software updates on cloud-based distribution points

A feature that has been requested but is debated as well, as for Microsoft Updates the clients can download the content from Microsoft Update as it will introduce an additional cost for hosting them in the Cloud DP. Something to think about.

The features listed I wrote about here is far from complete, check out the documentation for a complete list.. It is great to follow the development of the product that is being done now, impressive!

In WinPE 1607 Dot3svc fails to load as I and many others have noted before. Today on the comment to my post “Robert” posted the following workaround which seems to be working just fine!


Copy the following files from a windows 10 1607 installation to winpe:

%windir%\l2schemas\OneX_v1.xsd %winpewindir%\l2schemas\OneX_v1.xsd

%windir%\system32\l2gpstore.dll %winpewindir%\system32\l2gpstore.dll

%windir%\system32\onex.dll %winpewindir%\system32\onex.dll

%windir%\system32\en-US\onex.dll.mui %winpewindir%\system32\en-US\onex.dll.mui

%windir%\system32\wbem\en-US\l2gpstore.mfl %winpewindir%\system32\wbem\en-US\l2gpstore.mfl

Thanks Robert for sharing this! All credit to your work!

Configuration Manager 1612 Technical Preview was released a couple of days ago and I have been playing around with it all the time I could spare since! Many new features that makes us long for 1701TP already now to see how the new features have improved.

I cannot help seeing a picture before me where David James are Santa Claus and the rest of fhe ConfigMgr team are his helpers :-) , the work and innovation put in Configuration Manager the last year is truly amazing! Fantaststic Work!

I have played around with a couple of the new features so I will cover them here, for a complete list of new features check out the documentation:

Task Sequence Retry option:

We have a new retry option when a Task Sequence fails because there is not content availble or a deployment could not be found for the computer in WinPE. A great addition, there are more steps that could benefit of a “retry” option but I am sure that will come.

It looks like this when content is missing on the DP, we now have a “Previous” button in the dialog, so we can retry the previous step.


Checking for running applications when an application is about to install.

This is a very big deal as well, we can now add .exe files that shouldn’t be running when our application is trying to install. We add the .exe files in a new tab for the deployment type.

Check runnning

I tested with an available deployment to a user and then this dialog is shown. A friendly name would be a great addition so the user knows what to close, a retry option like in the TS would also be good.

Software Center dialog

Android for Work

Android for work is in the console but not yet operational. Also high on our list to Santa.

Android for work

Data Warehouse

We got a new Site System role “Data Warehouse service Point” which is just that, a DatawareHouse. It makes it possible to copy data to another SQL database for long term storage. This is great as we can replace all the custom solutions out there today. I love the


We can then choose which custom tables to include/exclude in out Data Warehouse and when to synchronize data.


There are a couple of builtin reports as well that uses the Data Warehouse as datasource. The one I am sure I will use the most is the “Endpoint Protection and Software Update Compliance report” great stuff no more custom solutions to solve that for customers.


OData endpoint data access

We have a new option under Site Properties to enable REST endpoint for quering Configuration Manager data from the tool of our choosing, PowerBI or Excel for instance.

Restfull Odata

Express files support for Windows 10 (RS2 or update to RS1 in early 2017 required)

We can now enable support for Express updates both on our Software Update Point and in the client settings as well to allow the client to use the Express files. This feature requires either Windows 10 RS2 or an update coming to Windows 10 1607 in early 2017 to work. Express updates are a big deal, because they bring down the amount of data that the clients will download when applying Windows 10 Cumulative Updates.

Express updates SUP

Express updates client

Enhancement for online-licensed apps from the Windows Store for Business (RS2 required)

This feature will make it possible to deploy Online licensed apps using Configuration Manager, the next step towards the future of application management.

Azure AD onboarding

We can now add our Azure AD to Configuration Manager which can in turn be used by the Cloud Management Gateway to provide user policies to our clients when they use the Cloud Management Gateway.


In-console improvements

Ther are som console improvements, where my favorite is that it actually remembers if you selected to search sub-nodes.


So many new features to try out! There are more, like the command line tool to cleanup content in the content library and I am sure much more as well. I will play around with it some more and see what I can find.

Data Warehouse for historical reporting
Azure Active Direcotory Onboarding
Windows Hello for Business toast notification
Enhancement for online-licensed apps from the Windows Store for Business
Express files support for Windows 10 cumulative update

I promised last week I would write a blog post on how I use OSDbackground in case of a Task sequence failure, so here it is. OSDbackground gives us the possibility to show an error in case a Task Sequence fails and when doing so it also provides us with the option to read all TS variables and open a command Prompt or CMtrace without having F8 Support enabled.

Well, to handle errors in a Task Sequence I use a couple of small scripts that I will describe here and that can be downloaded further down in the blog post. Basically, the functionality is the same as in an MDT integrated Task Sequence.

We start by using a group called “Execute Task Sequence” with the “continue on” error option selected.

TS error handling

Then we run our whole Task Sequence within that group, in that way we can catch any error in a group later in the Task Sequence.

I also set the variable shown above “SMSTSErrorDialogTimeOut” to “28800” which equals 8 hours. If the task sequence fails, the countdown timer will count down from 8 hours before restarting.


In the end of the Task Sequence we have two groups, “OSD Completion” and “OSD Error”.

The OSD Completion group is run as the name indicates when the Task Sequence is successful, using the Task Sequence variable “_SMSTSLastActionSucceeded” = “True”. We remove the computer from the OSD Collection using the Onevinn WebService in this group as well.


I also added a little step to stop the OSDBackground process, if we don’t restart the computer after we started OSDBackground the last time it will still show as desktop background when the user logs on.

The Powershell script used looks like this.

Stop-Process -Name “OSDBackground” -Force -ErrorAction SilentlyContinue

What if the Task Sequence fails?

In the OSD Error group we have a couple of interesting steps as well. The OSD Error code has the following condition. Using the same Task Sequence variable as before when there is an error in the Task Sequence, “_SMSTSLastActionSucceeded” = “False”.


The next step saves the error code from the Task Seqeunce step that actually failed in a Task Sequence variable called “ErrorReturnCode”. We use that later to actually fail the Task Sequence using a script but with the original error code.


The next step uses OSDBackground to change the Background image and enable us to open a password protected debug mode with ,command prompt support without having F8 enabled.


The next three steps are from the sample scripts in the Onevinn OSD WebService, and the first one sets a couple of variables we need to be able to remove it from the Collection used to target the OS deployment.


The next step remove the computer from the OSD Collection.


We can then disable the computer account using the Web Service in the domain to make sure no one uses a computer with a failed OS deployment potentially missing anti-virus and much more.

Disable Computer account

Then we use a small script that will fail the Task Sequence with the original error code that we saved in the variable before.


The script used looks like this:

$tsenv = New-Object -ComObject Microsoft.SMS.TSEnvironment

exit $tsenv.Value(”ErrorReturnCode”)

The result is a Task Sequence that will end up with this dialog when it fails.


Now we can right-click in the upper left corner and supply the configured password to open the debug options in OSDBackground and troubleshoot our Task Sequence error without having F8 enabled in our boot image.


OSDBackground was updated on Technet yesterday as well, so if you don’t have CMtrace in your image, you can just copy Cmtrace.exe to the OSDBackground package and it will copy CMtrace to the local drive so it can be used to read the log files. A great addition by Johan!
The two scripts used can be downloaded here and I would add them to the OSDBackground package so we can run them from the same package in our Task Sequence.

OSDBackground Addon

Thanks Johan Schrewelius for creating OSDBackground!!

I wrote a blog post a while ago on a tool my college Johan Schrewelius has published which sets the OSDbackground during OSD and gives us the possibility to troubelshoot without F8 support enabled which should be avoided. An update of OSDBackground is now published with som bug fixes like:

1. Added Management Point to Wallpaper.

2. Made “ComputerNameVariable” Case Unsensitive.

3. Masked sensitive TS Variables in Debug mode.

4. Added support for Error background.

5. Moved background pictures to sub folder

The error background is a great addition, using this we use OSDBackground with a specific background when a Task Sequence fails and then we can access a Command Prompt or Cmtrace without F8 support enabled. We need to have a section in our Task Sequence with steps that are executed when a TS fails, I will write a post on that later this week. Configuring the “SMSTSErrorDialogTimeOut“ variable to for example 28′800 =8 hours is a good idea so we have time to catch the computer with the error still present.


Adding a step to our TS failed section like this:

OSDBackground Error

Then we get the following dialog when the Task Sequence fails.


OSDBackground can be downloaded on Technet Gallery:

I have used Michael Niehaus excellent script for dumping all task sequence variables during OSD which is great for troubleshooting.

However it dumps all TS variables including:

  • _SMSTSReserved variables which for instance contains the Network access account username and password in clear text. The same goes for the Domain Join account used in the Task Sequence.
  • _OSDOAF which contains the TPM Password Hash for the computer it the Pre-Provision Bitlocker step is used and it takes ownership of the TPM.

So my college Johan Schrewelius posted a nice little Powershell script that can be used instead, which excludes the “sensitive” variables and only write the public ones to the log file.
It can be downloaded here:

In many environment scripts used for troubleshooting like this are left in the production Task Sequences and that is not a really good idea if it includes username/password in clear text or TPM password hash.

The script simply filters out the “sensitive” variables:

FilterSo if you need to use a script to list the TS variables be carefull where that log file is stored or use this one.

Great to wake up to a new release of Configuration Manager Technical Preview 1611! The Configuration Manager team must have been really busy, first shipping 1610 and then a week after 1611 technical Preview.

Truly impressed by the work they are putting in the product!

Not that many new features in 1611 Technical Preview though but a really useful one, the possibility to pre-cache the content for an available Task Sequence deployment.

Cm1611TP New


In previous releases there have been more features than was listed in the What’s New section.. Wonder if there are any this time…