Improving the ConfigMgr Inplace-Upgrade Task Sequence

As you probably know, ConfigMgr Current Branch has a built-in task sequence template for Windows 10 Inplace-Upgrades. This template is used for Windows 7/8/8.1 to Windows 10 upgrades, as well as for Windows 10 to Windows 10 upgrades (when a new feature update is available).

However, the default task sequence template for Inplace-upgrades are missing some useful features. This post shows you how to add them.

Note, October 2, 2019: For a bit more than a year, I've been starting to split up this sequence into two sequences. One for pre-flight, pre-cache, and validation. And one for the actual upgrade. For more info on that concept, check this link: https://miketerrill.net/2019/01/01/windows-as-a-service-in-the-enterprise-table-of-contents/

Update, July 13, 2017: Added in better logic for driver packages and uploaded an exported ready-made task sequence.

Download the task sequence: http://github.com/DeploymentResearch/DRFiles/blob/master/Misc/Windows10UpgradeTS.zip

Adding Setup Upgrade Assessment and Driver support

The features I recommend adding to the Inplace-Upgrade task sequence is a setup upgrade assessment action, as well as adding support for injecting drivers.

1. Edit your Inplace-Upgrade task sequence, add an extra Upgrade Operating System action, configured it to continue on error, and rename it to Upgrade Assessment.

image
Adding the upgrade assessment action.

The compatibility scan will always spit out a non-zero return code, for example 0xC1900210 which is the no issues found return code. The return code is set in a new read-only task sequence variable, the _SMSTSOSUpgradeActionReturnCode variable, and the reason for having a variable that, is so you can use it further down the line in the task sequence. The important thing is that even though Windows setup spits back a hexadecimal value, ConfigMgr reads it as a decimal value, so you need to do some conversion. For example 0xC1900210 in hex is 3247440400 in decimal.

2. Modify the Upgrade the Operating System group to use a task sequence variable as condition: Add _SMSTSOSUpgradeActionReturnCode, and set the value to 3247440400.

image
Configuring the Upgrade the Operating System group with a condition.

Next up is adding driver support, and in this example I had a Windows 10 driver packages for Dell Latitude E7270 and HP EliteBook 8560w.

3. In the Upgrade the Operating System group, add a new group named Drivers, and then use the Download Package Content action to download the driver packages. Also set a condition to only download the package if you're deploying to that model.

4. Configure each Download Package Content action to save the path as a variable, in my case I used a custom path of %_SMSTSMDataPath%\Drivers. By using this path, ConfigMgr automatically cleans out the drivers folder when deployment is completed. (Thanks @WillKo2513 for the tip).

image
Adding Download Package Content actions with driver packages.

5. Then also add in condition on each Download Package Content action, to make sure it only downloads the package if you have that hardware model. Simply add a WMI Query filter for the model, for example: SELECT * FROM Win32_ComputerSystem WHERE Model LIKE '%Latitude E7270%'

Note:  Since the upgrade task sequences in ConfigMgr are not integrated with MDT by default, you can't just use a task sequence variable like Model equals Latitude E7270. That's why you use a WMI Query in the preceding step.

image
Adding conditions for the driver packages using old school WMI since we don't have added the MDT actions in this task sequence.

6. Now, the Upgrade Operating System action does have an option (check box) to install drivers that you added, but don't use it. It will fail if there are no drivers available, and there will be models for when you don't need drivers. Instead you will add instructions in the next stop for the setup to add drivers, but only if there are any drivers needed.

Note: You can also add multiple Upgrade Operating System action with different conditions on them, one when there are drivers available, and one when they are no drivers. But I prefer to have a single one, so skip to the next step.

image
Skipping the drivers configuration on the Upgrade Operating System action.

7. After the last driver package, add a Set Task Sequence Variable action with the following settings:

Name: Instruct setup to install drivers if available
Description: The driver option on the Upgrade Operating System action fails if folder doesn't exist, using this as a workaround
Task Sequence Variable: OSDUpgradeStagedContent
Value: %_SMSTSMDataPath%\Drivers

Condition: %_SMSTSMDataPath%\Drivers exists

Note: In this task sequence you're using the undocumented OSDUpgradeStagedContent variable, since that's the variable the Upgrade Operating System action is using by default. Technically you can also use the OSDSetupAdditionalUpgradeOptions variable, and add the /installdrivers %_SMSTSMDataPath%\Drivers value, but the OSDSetupAdditionalUpgradeOptions is primarily intended for the /reflectdrivers option and for language packs. The use of the OSDUpgradeStagedContent varible simply makes it easier to handle different combinations of features that you need to apply, like one machine needing drivers and language pack, another just the language pack, and a third only the drivers.

image
Instruct setup to use drivers, if they exist.

image
Setting the condition.

All done.

Written by Johan Arwidmark

About the author

Johan Arwidmark

5 1 vote
Article Rating
Subscribe
Notify of
guest
33 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Shazi
Shazi
2 years ago

Hi John

This is really nice trick. I am bit new to CCM. is there a way to install the required updates during the upgrade.

Last edited 2 years ago by Shazi
philip day
philip day
2 years ago

Hey Johan do you know if this still works with the new featurepack upgrade option?

Scott
Scott
2 years ago
Reply to  philip day

This is exactly what I'm trying to figure out as well. I've been unsuccessful so far at making this work when using the Feature Upgrade option in ConfigMgr 2103. The drivers download during the TS as expected, but the driver versions after upgrading to a newer Windows 10 version are all the exact same in Device Manager after upgrade. I *am* using Driver Packages instead of Packages for the drivers, but they contain flat .inf, .sys, .cat files, so I figured this would work.

Very curious what your results are Johan, once you test.

Joakim Tomren
Joakim Tomren
2 years ago

Hi Johan. I am running on Configmgr 2006. When i try to run in-place upgrade from CMG i get an error on the driver (standard) package download. It says 0x80040102 content request for package pxxxxx failed. I am running the deployment with only download when needed becuase i have many drivers and cant download all to all computers. From 1910 microsoft clearly states that download if neded should be supported.

Joakim Tomren
Joakim Tomren
2 years ago

I found the issue to be that the default client policy set with enable "Cloud Services" did not apply to the clients. I needed to create a separate policy and apply to all clients to make the Cloud services enabled.

my name is jeff
my name is jeff
3 years ago

hi. to be clear on something can you use a driver package for this like you maybe would for an OSD build or doers it have to be executables for all drivers bundled into one package? my driver packages are generally .cat and .inf not a standalone installer.

sung kim
sung kim
3 years ago

after the upgrade assessment nothing happens. task sequence states installed. is there something i'm missing. it doesn't continue to upgrade the operating system.

Devendra Rawal
Devendra Rawal
4 years ago

I followed exactly as you described above for my in place upgrade TS. However, after upgrade completes on HP EliteDesk 800 G1 SFF model, display driver was not updated on the workstation and two monitors mirrored with same display. Thank you in advance for advice.

David
David
3 years ago
Reply to  Devendra Rawal

Did you ever get this to work as we have the same issue with the HP 800s G1 and G2. Only MS basic video adapter gets installed

Schlichi
Schlichi
4 years ago

Hello Johan,
When the variable "OSDUpgradeStagedContent" is set. Are only the drivers in the stored directory considered for the upgrade or in addition to the already existing drivers?
Thank you
Schlichi

Sta
Sta
4 years ago

Hello Johan,

very helpful blog. Then you very much
Unfortunately, I get an error message when the driver packages downloading

„Failed to copy package XXX00222 from " to 'C:\_SMSTaskSequence\Drivers\XXX00222' (0x80070057)“
„Failed to download package XXX00222, cannot continue (0x80070057)“

Do you have an idea why this happens?

Tom P
3 years ago

I've never done packages for drivers. Always driver packages. Is this a pre-req for using the Download Package Content function?

John
John
4 years ago

Hello,

Could you please check on this? IF the Upgrade Assessment action, running the Compatibility Scan, spits a result different than 0xC1900210 (meaning incompatibility video drivers, for instance), the whole group Upgrade the Operating System won´t run, because you set there a condition for a "Compatibility Scan OK" result. So, what if I need to upgrade the video drivers, for instance, before the Upgrade Operating System action?
Thanks,

john
john
4 years ago

If you wanted the drivers to stay there (as part of a PRE-Cache) type deployment, how would you go about that? Example – Push 1 IPU TS that caches the OS and software and drivers. Then the TS that runs it later with all the content.

Lee
Lee
4 years ago

This is an excellent approach to driver management in SCCM! A colleague and myself are having an issue that we are having trouble pinning down. My 2 test machines bring down the appropriate driver package (using the WMI statement), we see the drivers downloading into the corresponding package ID folder, and then they delete themselves (every single time) after the download completes. My colleague sees this on his SCCM server as well at a totally different site, so we are obviously encountering the same issue. The next visible step is Upgrade Operating System, but of course- the drivers aren't there.… Read more »

John
John
4 years ago

Looks good, although mine seems to download the driver package twice, unless it just copies it to the second location?

c:\_SMSTaskSequence\Drivers\PackageID & c:\_SMSTaskSequence\Packages\PackageID

Bob
Bob
4 years ago

I get a message Enter a valid local folder or network path when I click Apply for the Custom path box.


>