Jump to content


anyweb

A deeper look at the Upgrade task sequence in System Center Configuration Manager (Current Branch)

Recommended Posts

Introduction

 

At the start of this series of step by step guides you installed System Center Configuration Manager (Current Branch), then you configured discovery methods. Next you configured boundaries to get an understanding of how automatic site assignment and content location works. After that you learned how to update ConfigMgr with new features and fixes using a new ability called Updates and Servicing and you learned how to configure ConfigMgr to use Updates and Servicing in one of these two modes:

To prepare your environment for Windows 10 servicing you learned how to setup Software Updates using an automated method (via a PowerShell script) or manually using the ConfigMgr console. Next you used a PowerShell script to prepare some device collections, then you configured client settings for your enterprise and finally you'll deployed the ConfigMgr client agent using the software updates method which is the least intensive method of deploying the Configuration Manager client agent.

 

As System Center Configuration Manager (current branch) is being delivered as a service now, version 1602 was made available (March 11th, 2016) and you used Updates and Servicing to do an in-place upgrade to that version as explained here. Next you learned about how to use the Upgrade task sequence to upgrade your Windows 7, Windows 8 (and 8.1) and even your Windows 10 devices to a later build of Windows 10.

 

You then learned about the new Windows 10 servicing features which use Servicing Plans in ConfigMgr (Current Branch). Next you integrated MDT 2013 update 2. MDT integration with ConfigMgr is useful as it provides additional functionality for operating system deployment scenarios such as Offline Language Package installation or User Driven Integration (UDI).

 

Next you learned how to deploy Language Packs offline for Windows 10. To assist with Windows 10 servicing and for applying appropriate software updates to your Windows 10 devices, you used PowerShell to add queries to the various Windows 10 collections.

 

In this post you'll take a deeper look at the Windows 10 Upgrade task sequence, and see one way of dealing with potential upgrade issues. The idea here is to keep track of any upgrade failures, capture the logs that matter, capture the computer name and hardware type. If you see repeated 'common' failures you can add those error codes to the Windows Setup compatibility scan PowerShell script. This way your users that do experience failures will not get cryptic error messages, and you'll have the logs to fix things.

 

Step 1. Create a share to store failed upgrade log files

As you'll want to keep track of potential problems, create a hidden share to store log files. On your configuration manager server, start Windows PowerShell ISE as Administrator, and run the create upgradelogs.ps1 PowerShell script available in the downloads section at the end of this guide.

 

create upgradelogs share.png

 

Step 2. Create a package

On your ConfigMgr server, in the sources share, create a folder called Windows setup compatibility scan results and place the WindowsSetupCompatibilityScanResults.ps1 PowerShell script in the folder. Locate, select and copy ServiceUI.exe from the Sources\OSD\MDT\MDT2013u2\Toolkit\Tools\x86 folder as shown below.

 

serviceui from x86.png

 

paste that into the Windows setup compatibility scan results folder.

 

package folder.png

 

In the ConfigMgr console, Software Library, select Packages and right click, choose Create Package. Fill in the following details.

 

create package.png

 

Choose Do not create a program and then continue through the wizard until completion.

 

package created.png

 

Step 3. Distribute the package

 

Right click the package and choose Distribute Content. Distribute the package to your distribution points.

 

distribute content.png

 

continue through that wizard until completion.

 

Step 4. Edit the existing upgrade task sequence

In a previous guide you created the Upgrade task sequence, now it's time to add additional functionality to that task sequence. In the ConfigMgr console, locate the Upgrade to Windows 10 x64 version 1511 task sequence, right click on it and choose Edit.

 

edit task sequence.png

 

In the Prepare for Upgrade group select the Check Readiness for Upgrade step and click on Add then select New Group, name the new group Set Variables.

 

Set Variables.png

 

Create a new Set Task Sequence Variable step called Set Server as follows:

 

set server.png

 

Create a new Set Task Sequence Variable step called Set Share to UpgradeLogs$ as follows:

 

set share.png

 

Create a new Set Task Sequence Variable step called Set Domain (fill in your domain name) as follows:

 

set domain.png

 

Create a new Set Task Sequence Variable step called Set User and enter a username that will be used to connect to the share as follows:

 

set user.png

 

Next create another New Group and call it Windows Setup compatibility scan

 

new group 2.png

 

Next click on Add, choose Images, then Upgrade Operating System and name the step Windows Setup compatibility scan. Select the Perform Windows Setup compatibility scan without starting upgrade option.

 

perform windows setup compatibility scan.png

 

On the Options tab, select the Continue on Error option.

 

continue on error.png

 

Click Add and choose Run Command Line, name the step Process Windows Setup compatibility results and paste in the following:

ServiceUI.exe -process:TSProgressUI.exe %windir%\sysnative\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Hidden -NoProfile -ExecutionPolicy bypass -nologo -file WindowsSetupCompatibilityScanResults.ps1

For Package, select the Windows Setup compatibility scan results package created above.

 

process windows setup compatibility scan results.png

 

Create a New Group called Capture Windows Setup logs on failure

 

capture setup log files on failure.png

 

On the Options tab, check if the following Variable WindowsSetupCompatibilityScan = Failed as shown below

 

FAILED.png

 

Next create a Connect To Network Folder step and populate it as below

 

connect to network folder.png

 

when prompted for Windows User Account enter the Password for the account you added in the Set User step

 

windows user account.png

 

Create a new Run Command Line step called xcopy WindowsSetupCompatibilityScan log file and paste in the following:

cmd /c ECHO F | xcopy /Y  C:\Windows\Temp\WindowsSetupCompatScan.Log Z:\%computername%\WindowsSetupCompatScan.log

xcopy windowssetup.png

 

On the Options tab of this step, place a checkmark in Continue on error

 

continue on error for each step.png

 

Create a new Run Command Line step called xcopy Windows Setup log files and paste in the following:

cmd /c xcopy  /C /Y  C:\$WINDOWS.~BT\Sources\Panther\*.log Z:\%computername%\

xcopy windows setup log files.png

 

On the Options tab of this step, place a checkmark in Continue on error

 

continue on error for each step.png

 

Create a new Run Command Line step called xcopy SMSTS log files and paste in the following:

cmd /c xcopy  /C /Y  C:\Windows\CCM\LOGS\SMSTSLOG\*.log Z:\%computername%\

xcopy smsts log files.png

 

On the Options tab of this step, place a checkmark in Continue on error

 

continue on error for each step.png

 

Create a new Run Command Line step called xcopy XML log files and paste in the following:

cmd /c xcopy  /C /Y  C:\$WINDOWS.~BT\Sources\Panther\*.xml Z:\%computername%\

xcopy xml files.png

 

On the Options tab of this step, place a checkmark in Continue on error

 

continue on error for each step.png

 

Create a new Run Command Line step called del network connection and paste in the following:

cmd.exe /c "net use * /del /yes"

del network connection.png

 

On the Upgrade Operating System group, click on the Options tab and set the variable WindowsSetupCompatibilityScan = OK

 

upgrade operating system group.png

 

Apply the changes and close the Task Sequence editor.

 

Step 5. Review the new functionality

Tip: To induce a failure you can temporarily disable the Check Readiness for Upgrade step and use a Virtual Machine with only 1.5GB of RAM. This does not meet the requirements as stated here and will cause the Windows Setup compatibility scan step to report a failure.

 

Here are the system requirements for updating to Windows 10 (as of 2017/1/5)

 

system requirements.png

 

Once an Upgrade failure takes place you'll see something similar to the following:-

 

not ready for upgrade.png

 

after clicking OK the task sequence will jump to the end without any further communication to the end user. At this point (or whenever it's convenient) check the UpgradeLogs$ share for new content. For every failure that occurs, a folder matching the Computer Name will be created.

 

folders in upgradelogs share.png

 

In that folder you'll find log files and bunch of XML files, these files will help you to troubleshoot the actual failure

 

log files in the folder.png

 

The WindowsSetupCompatScan.log file is generated by the Windows Setup compatibility scan results script and sample content is below. Note that it contains information about what the error was (including friendly text about the error) and the date/time and hardware that it occurred on.

 

windows setup compatibility scan log.png

 

In addition to that log file you have the smsts.log file from C:\Windows\CCM\Logs\SMSTSLOG folder and two relevant Windows setup log files called setupact.log and setuperr.log from the C:\$WINDOWS.~BT\Sources\Panther\ folder.

 

The failure highlighted in setupact.log is shown below (clear as mud right ?)

 

failure highlighted in setupact.png

 

The PowerShell script converts knownerrorcodes into meaningful text that won't give your end users a heart attack. You can add your own known error codes and friendly text by editing the PowerShell script in this section:

 

knownerrorcode.png

 

Well that's it ! job done, I hope this helps you with your Windows 10 Upgrade Task Sequences.

 

Tip: You can use the MailLog functionality described in the Windows-noob OSD Guides book to be notified of failures in real time.

 

 

Summary

Sometimes things don't go according to plan and the Windows 10 Upgrade task sequence can fail for a variety of reasons. Rather than having the task sequence fail during an actual upgrade, it makes sense to run a compatibility scan first and to assess the results of that scan before attempting the actual upgrade. If the compatibility scan does fail, you can notify your users with a helpful message and the task sequence will automatically capture the data you need to troubleshoot and resolve the upgrade issue. This guide helps you achieve that goal.

 

Related Reading

Downloads

You can download a Microsoft Word copy of this guide here dated 2016/05/14.

 

a deeper look at the Windows 10 Upgrade task sequence.zip

 

You can download the PowerShell scripts used above here.

 

WindowsSetupCompatibilityScanResults.zip

  • Like 1

Share this post


Link to post
Share on other sites

Hi Niall

 

I know you temporarily disabled the "Check Readiness for Upgrade" step but I was wondering if it was still required if the Windows 10 Setup Compatibility Scan did the same thing by returning Error Code C1900200 (Does not meet system requirements for Windows 10) ?

 

I'm trying to minimize my task sequence as it continues to grow by adding more logging features etc.

 

Thanks

Share this post


Link to post
Share on other sites

it's required if you care about deploying this task sequence to computers that don't meet the criteria (servers, low ram, low disk space...)

 

of course if your collection queries do this then you can remove it.

Share this post


Link to post
Share on other sites

Tried following your steps, but am getting errors when the PS1 script attempts to run during the task sequence:

 

Process completed with exit code 4294967295

 

Failed to run the action: Process Windows Setup Compatibility Results.
Unknown error (Error: FFFFFFFF; Source: Unknown)

Share this post


Link to post
Share on other sites

Hi,

I test myself this task and everything is working fine.

I have a bunch of Lenovo T450, T460s and T460p in my company. Almost every time I got the "video card incompatibility issue".

I injected the drivers directly in the Win 10 image using dism, but I get the same error all the time.

How can this be solved beside checking the " ignore any incompatibility issue" check box?

Thanks,

Ovi

 

Share this post


Link to post
Share on other sites

On 6/8/2017 at 8:53 PM, ogeccut said:

Nor sure if you are still looking at this. For some reason my logs do not copy to a UpgradeLogs$  share.

Where can i check in the logs what is going on? I dont see anything in smsts.log file. 

Thank you

Memory.jpg

can you attach your smsts.log files please ?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.