CCMEXEC.COM – System Center blog

CCMEXEC.COM – by Jörgen Nilsson

To follow up on my post earlier this week about how to enable UE-V during OSD and get it to sync Internet Explorer favorites I will cover UE-V templates Powershell and a template share.
In UE-V we can define a central template share where we can drop a UE-V template and the clients will automatically pick it up. New in Windows 10 1607 is that we also must register even the builtin templates so if we just enable UE-V no templates are imported. In UE-V 1607 the builtin templates are placed in C:\Programdata\Microsoft\uev\InboxTemplates. We can register them with a Powershell script during OS deployment for instance.

In this example I will register all of the templates in the inbox templates which I don’t think you should. I will get 35 templates in my Templates folder that contains registered templates after they are imported.Template 1

And everything works just fine.

If I then specify a central template share and then restart the computer… I am left with only 26 + the Google Chrome one from my template share. The rest is removed.

Template2

Conclusion: When using UE-V register all templates during OS deployment that you want to make sure that they are used the first time the user logs on and add all the Office related templates to a template share if a template share is used, otherwise they are unregistered after the first reboot.

User Experience Virtualization(UE-V) is builtin Windows 10 1607 and no longer a standalone installer as it has been before. This is great as UE-V is a very powerful solution to Synchronize application settings like for instance Outlook signatures; IE favorites, Windows themes and so on.

When we design and build our new Windows 10 platform we should move away from legacy solutions and use new features to build a modern client.

I have had an issue that Internet Explorer favorites doesn’t sync in Windows 10 1607, and we tried a couple of workarounds but they never synced on the first logon for the user which is very annoying.

What we ended up with solving this is to configure the following to UE-V settings using Powershell: WaitforSyncOnApplicationStart and WaitForSyncOnLogon (it turns out that it is the waitforsynconlogon that actually solves it.)

After that the Internet Explorer favorites synchronizes as expected :-)

The script we currently use to enable UE-V looks like this, can be run during OS deployment or as a package/program.

Enable-Uev

Set-uevconfiguration -computer -EnableWaitforSyncOnApplicationStart -enablewaitforsynconlogon

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\DesktopSettings2013.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\EaseOfAccessSettings2013.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\MicrosoftInternetExplorer2013.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\MicrosoftInternetExplorer2013Backup.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\MicrosoftNotepad.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\MicrosoftOffice2016Win32.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\MicrosoftOffice2016Win64.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\MicrosoftOutlook2016CAWin32.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\MicrosoftOutlook2016CAWin64.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\MicrosoftSkypeForBusiness2016Win32.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\MicrosoftSkypeForBusiness2016Win64.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\MicrosoftWordpad.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\NetworkPrinters.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\RoamingCredentialSettings.xml

Register-UevTemplate -LiteralPath $env:ALLUSERSPROFILE\Microsoft\UEV\InboxTemplates\ThemeSettings2013.xml

I will write another post this week about the templates and how it works when you use a Template share which is also very interesting.

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, https://docs.microsoft.com/en-us/sccm/osd/deploy-use/task-sequence-steps-to-manage-bios-to-uefi-conversion If you are still on 1606 or earlier you can still use this method: http://ccmexec.com/2016/07/switch-from-bios-to-uefi-seamless-using-configuration-manager-ts-in-6-simple-steps/

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”.

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.

OSDInjection.xml

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.

OSDinjection_Date

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: https://docs.microsoft.com/en-us/sccm/core/get-started/capabilities-in-technical-preview-1701

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.

TaskSequenceApps

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.

PackageID

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. http://ccmexec.com/2016/09/dot3svc-does-not-load-using-winpeadk-1607/ Today on the comment to my post “Robert” posted the following workaround which seems to be working just fine!

Dot3svc

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: https://docs.microsoft.com/en-us/sccm/core/get-started/capabilities-in-technical-preview-1612

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.

TSretry

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

DataWarehouse

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

DataWarehouse1

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.

DWReports

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.

AzureAD

In-console improvements

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

Search

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.

SMSTSErrorDialogTimeOut

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.

OSDCompletionGroup

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”.

OSDErrorGroup

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.

SaveErrorCode

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.

OSDBackgroundError

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.

SetTSVariable

The next step remove the computer from the OSD Collection.

RemoveFromOSDCollection

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.

SetErrorCode

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.

TaskSequenceError

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.

TSError2

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.

SMSTSErrordialogTimeOut

Adding a step to our TS failed section like this:

OSDBackground Error

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

TaskSequenceError

OSDBackground can be downloaded on Technet Gallery: https://gallery.technet.microsoft.com/Replacement-for-BGInfo-0095cff3