Adding Drivers During Windows 11 Inplace Upgrades with ConfigMgr Task Sequences

When upgrading/servicing either Windows 10 or older Windows 11 versions to newer versions, your various modules is going to fall into one of four driver scenarios:

  1. Do nothing. Means that whatever driver that is there will happily work with the new Windows version. VMs often fall into this category, even though exceptions apply.
  2. Update drivers prior to the upgrade. A quite rare scenario, but I've seen Windows security features requiring specific drivers or certain drivers being blocked.
  3. Update drivers ruing the upgrade. The by far most common scenario, and a good safeguard scenario too. In general, if a vendor provides a driver package for the Windows 11 version you are going to, it's not going to hurt adding it.
  4. Remove drivers before an upgrade. Also, a quite rare scenario, but there have been time I've had to remove an existing vendor driver, so a newer inbox driver can take its place.

Real World Note: Providing a proper driver package for the Windows 11 version you are upgrading will prevent common issues after the upgrade. For example, Windows Hello being broken.

    Using the Driver Automation Tool Solution

    My favorite solution for adding drivers for inplace upgrades is the Driver Automation Tool solution from Maurice Daly. This tool helps create a proper driver package (WIM file) in ConfigMgr for each of your models, and then has a script you add to your task sequence to apply it. This script has an -OSUpgrade switch that you use for inplace upgrade scenarions.

    Using the Driver Automation tool to download and create driver packages.

    Step 1 – Configure the tool and download one or more driver packages

    The first step is simple. Download the tool and follow the Setup Guide to configure it for your ConfigMgr environment. Then use the tool to create driver packages in ConfigMgr.

    Step 2 – Configure a Service Account

    The PowerShell script (Invoke-CMApplyDriverPackage.ps1) that downloads and stages the driver during the inplace upgrade needs to have permissions to query the ConfigMgr AdminService for driver package. Read-only Analyst permissions are enough. Create a user in Active Directory and assign it the Read-only Analyst security role. In my example, I used the CM_WS account.

    Configuring the service account.

    Step 3 – Configuring the Task Sequence

    Make a copy of your Windows 11 upgrade task sequence, edit it, and add a new group named Modern Driver Management. In that group, add a Set Dynamic Variable action, and configure these variables:

    • MDMUserName = <service account name in UPN format>
    • MDMPassword = <service account password>

    Real World Note: Starting with ConfigMgr 2509, the AdminService will reject NTLM authentication, so ensure you use a UPN name, like cm_ws@corp.viamonstra.com or corp.viamonstra.com\cm_ws. The good old down-level logon names (NETBIOS) like VIAMONSTRA\CM_WS will no longer work.

    The Set Dynamic Variable action added.

    Finally, add the Invoke-CMApplyDriverPackage.ps1 to a package, and call it from a Run PowerShell Script action in the task sequence. Here is an example command line:

    -OSUpgrade -Endpoint "cm01.corp.viamonstra.com" -TargetOSName 'Windows 11' -TargetOSVersion '25H2' -OSVersionFallback

    Real World Note: Don't forget to add PowerShell to your WinPE 11 boot image, or the script will fail.

    The Invoke-CMApplyDriverPackage.ps1 called in a task sequence.

    Behind the scenes

    During the Inplace upgrade, the Invoke-CMApplyDriverPackage.ps1 script will query ConfigMgr via the AdminService for matching driver packages. When a matching package is found, it will be downloaded and extracted to the C:_SMSTaskSequence\DriverPackage\<package id> folder. Then, the script will set the (undocumented but very useful) OSDUpgradeStagedContent task sequence variable to that value, to instruct Windows setup to use it during the upgrade. You can follow this in the ApplyDriverPackage.log file.

    About the author

    Johan Arwidmark

    0 0 votes
    Article Rating
    Subscribe
    Notify of
    guest
    0 Comments
    Newest
    Oldest Most Voted

    >