MaheshKumarSE

slmgr failing with 0x80041008 after the November update? Your KMS scripts are not broken. Here is the out of band fix

After the November 2026 security update, slmgr commands that install a product key or set the KMS domain started failing with 0x80041008 Invalid parameter on several Windows and Windows Server versions. Microsoft released out of band updates on 13 November to fix it. Which versions are affected, which KB fixes each one, and how to get it onto devices and servers.

This is the kind of problem that wastes an afternoon because everyone looks in the wrong place. An imaging task sequence, a KMS setup script or a server build suddenly fails at the activation step. The command has not changed in years. Run it by hand and you get this.

Error: 0x80041008 Invalid parameter (SWbemObjectEx)

Your script is fine. The November 2026 security update broke some slmgr.vbs operations. Microsoft confirmed it and, on 13 November, released out of band updates to fix it.

What broke

According to Microsoft, after the November security updates, "certain Windows licensing and activation operations" using SLMGR could fail with 0x80041008. The two commands people hit most are these.

  • slmgr.vbs /ipk, to install a product key.
  • slmgr.vbs /skms-domain, to set the KMS search domain.

Microsoft is clear about what this does not affect. Devices that were already activated stayed activated, and devices that did not need extra slmgr commands were not affected. Microsoft described the impact as a limited number of enterprise devices. In practice that means imaging, server builds, KMS configuration and any automation that sets keys or KMS settings after deployment.

Windows 11 24H2, 25H2 and 26H2 are not on the list of systems that needed the out of band fix.

Where this bites in practice

  • Windows 10 Extended Security Updates. If you are paying for ESU on Windows 10 22H2, the ESU key is installed with slmgr /ipk and activated with slmgr /ato. A device that has not had its ESU key installed yet cannot take it while this bug is present, and that can quietly leave it outside ESU coverage. Check these first.
  • Configuration Manager and MDT task sequences. Any step that installs a MAK or KMS client key, or points the device at a KMS host, fails here. The build often carries on and leaves an unactivated machine at the end.
  • Server builds. Templates and scripts that set the edition key or the KMS search domain during deployment fail at that step.
  • Edition changes. Moving a device between editions with a new key uses the same command and fails the same way.

If none of these apply to you, and your devices activate automatically, you may never have seen this error at all.

The fix for each version

All of these were released on 13 November 2026. They are cumulative, so they include the November security update as well.

System Out of band update
Windows 11 23H2 KB5136483
Windows Server 2025 KB5136489
Windows Server 2022 KB5136487
Windows Server 2019 and Windows 10 Enterprise LTSC 2019 KB5136490
Windows 10 22H2 with ESU, and Windows 10 Enterprise LTSC 2021 KB5136493

The steps, in order

  1. Confirm the error. Run the command that fails and check the output. You are looking for 0x80041008 with Invalid parameter.
cscript //nologo C:\Windows\System32\slmgr.vbs /skms-domain contoso.com
  1. Confirm the November update is installed. On Windows 11 23H2, the November security update is KB5131087. On other versions, check Update history for the November 2026 security update.
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 5
  1. Find the version and build. Use this to pick the right fix from the table above.
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' |
    Select-Object ProductName, DisplayVersion, CurrentBuild, UBR
  1. Check whether the device is affected at all. If the device is already activated and your process does not run slmgr after deployment, you do not need the fix. Check the activation state first.
cscript //nologo C:\Windows\System32\slmgr.vbs /dlv
  1. Get the fix on Windows 11 23H2. KB5136483 is offered as an optional update. On a device, go to Settings > Windows Update > Advanced options > Optional updates and install it.

  2. Get the fix for everything else from the Microsoft Update Catalog. Download the package for each server and Windows 10 version you run. Microsoft also lists WSUS as a channel for these updates.

  3. Check the prerequisites. For Windows 11 23H2, Microsoft says an update released on or after 8 July 2025 must already be installed, along with the latest servicing stack update. Devices that are current on monthly updates will already meet this.

  4. Update your reference images and build processes first. The places this breaks are task sequences, server templates and golden images. Patch those so new builds stop failing, then deal with existing devices.

  5. Include boot.stl when servicing images. Microsoft warns that if you add the update to installation media without the boot.stl file, devices may fail to start from that media with error 0xc0430001.

  6. Rerun the slmgr command. After installing the fix and restarting, run the command that failed in step 1 again. It should complete normally.

  7. Activate and confirm. Run slmgr /ato if your process needs it, then check the state again with slmgr /dlv.

  8. Plan for December. The December security update on 8 December is cumulative. If you do not want to deploy an out of band update, check the December release notes to confirm the fix is included and patch then. Until then, any build process that calls slmgr will keep failing on unfixed machines.

Find the machines that slipped through

Builds that failed at the activation step often finished anyway, so some machines may now be sitting unactivated. This short script reports the Windows licence status, and it works well as the detection script in an Intune Remediation, so you can see the answer across the fleet without touching each device.

$win = Get-CimInstance SoftwareLicensingProduct -Filter "PartialProductKey IS NOT NULL" |
    Where-Object Name -like 'Windows*' | Select-Object -First 1
if ($win.LicenseStatus -eq 1) {
    Write-Output "Licensed: $($win.Name)"
    exit 0
}
Write-Output "Not licensed (status $($win.LicenseStatus)): $($win.Name)"
exit 1

A licence status of 1 means licensed. Anything else is worth a look, and the device name in the Remediations report tells you where to start. Run it as SYSTEM in 64 bit PowerShell, and leave the remediation script empty until you know what you are dealing with.

Verify it worked

  • The command works. slmgr.vbs /ipk and slmgr.vbs /skms-domain complete without 0x80041008.
  • Activation is correct. slmgr /dlv shows the expected licence status and KMS settings.
  • Builds complete. Task sequences and server builds that failed at the activation step now finish.
  • Reporting agrees. Your update reporting shows the out of band update, or a later cumulative update, on affected machines.

Roll back

The out of band updates are cumulative and only add fixes on top of November, so there is normally no reason to roll back. If one causes a separate problem, uninstalling it takes the machine back to the November security update, which brings the slmgr failure back. In that case, the better path is to wait for the December security update and test it.

Troubleshooting

Symptom Likely cause What to do
Still 0x80041008 after the fix The device has not restarted, or the wrong package was installed Check the build against the table and restart
Windows 11 24H2 or later shows the error Not covered by this issue Treat it as a separate problem and check the exact command and parameters
Optional update not offered on 23H2 Updates managed by policy or WSUS Download KB5136483 from the Catalog or approve it in WSUS
Server boots fail from new install media boot.stl missing when the update was added to the image Rebuild the media with boot.stl included
Device shows as not activated The key or KMS setting was never applied while the bug was active Rerun the slmgr commands, then slmgr /ato

If you also see a known issue about SQL Server linked server connections staying open on your servers, that is a separate issue in the same updates. Microsoft says a mitigation is available through Microsoft Support for business.

Comments

Questions, corrections or your own experience with this? Sign in with GitHub to comment.