HomeNewsletterCommunityMVP FeedToolsArchiveBlogToday's NewsAboutServicesQuick Links Subscribe free
← Back to Blog
Windows 11 Windows 11WMICPowerShellCIMWMI24H225H2

WMIC Has Been Removed from Windows 11: Replace Your Legacy Scripts with PowerShell and CIM

IA
Imran Awan
24 August 2026

Windows has an old command-line tool called wmic. For twenty years it was the fastest way to ask a Windows computer a question from a script - things like "what's your serial number?" or "which updates are installed?" - all without opening any menus. Microsoft has now removed it completely from Windows 11. If you've never heard of wmic before, that's fine - this post explains what it was, why it's gone, and exactly what to type instead if you find an old script that still uses it.

Watch this post — YouTube walkthrough

Watch on YouTube · Subscribe at @EndpointWeekly

🎤 Podcast episode
WMIC Has Been Removed from Windows 11: Replace Your Legacy Scripts with PowerShell and CIM
The short version

Microsoft has removed a command-line tool called wmic.exe from Windows 11. The removal arrives in the August 2026 preview update (KB5067470) for versions 24H2 and 25H2, and it also applies to 26H1. It is not coming back. The good news: only that one old tool is gone - the system underneath it still works exactly as before. If an old script or program on your computer uses the word wmic, replace it with a PowerShell command called Get-CimInstance. The free script in this post checks a computer for you and tells you exactly what needs fixing.

The problem: an old tool just vanished, and nothing warns you

WMIC stands for Windows Management Instrumentation Command-line. That's a mouthful, so here's the plain version: it was a small program, wmic.exe, that you typed commands into to ask Windows questions or make small changes - similar to typing an address into a search bar instead of clicking through menus. It was popular in scripts and installers because it was quick to use and came built into Windows for free.

Microsoft has been warning about this for a long time, but most people never noticed. Here's the timeline, in plain terms:

YearWhat happened
2016 - 2021Microsoft quietly marked WMIC as "old and on its way out" (the technical word is deprecated), but it still worked fine.
2022WMIC became optional - still included, but Microsoft signalled it wanted people to stop using it.
2024WMIC was switched off by default, though you could still turn it back on if you needed it.
2025Upgrading to a new version of Windows would remove it, but you could still add it back manually.
2026Removed for good. As of the August 2026 update, there is no way to bring it back at all.

Microsoft does offer a small temporary download, called wmic_dlc.zip, for anyone who needs a bit more time. Think of it as a spare tyre, not a permanent fix - use it to buy time while you update your old scripts, not as something to rely on long-term.

Here's the part that catches people out: when wmic disappears, nothing pops up to warn you. A script that uses it simply fails the moment it tries to run that line:

Command Prompt - after the removal
C:\>wmic bios get serialnumber 'wmic' is not recognized as an internal or external command, operable program or batch file. # This is what "broken" looks like. Before removal, this same # command would have printed the computer's serial number instead.

The tricky part is that nobody remembers where every old wmic command is hiding. In a typical workplace, they turn up in places like:

Gotcha: the sneakiest case is software from other companies. If an installer secretly uses wmic internally, you can't see that just by looking at your own files - it fails quietly during installation, and the only clue might be a line buried in that program's own log file.

Why it happens: it was old, and it was risky

To understand what's actually disappearing, it helps to know that wmic was never the real engine - it was just a front door. Behind that front door sits a much bigger system called WMI (Windows Management Instrumentation), which is the part of Windows that actually stores and manages information about the computer - things like installed software, hardware details, and running programs. wmic was just one of several ways to knock on that door and ask a question. There are other doors, like PowerShell, that do the exact same job.

The 2026 change removes only the front door. The room behind it - WMI itself, and the Windows service that runs it - stays exactly as it was.

Context - the most common mix-up: people sometimes assume the whole WMI system is being shut down. It isn't. Only one old way of talking to it, the wmic.exe tool, is going away. Everything built on modern PowerShell commands like Get-CimInstance keeps working with no changes needed.

So why bother removing it at all, if it still worked? Two reasons.

First, it's simply old. It was flagged as outdated back in 2016, and Windows has had a fully capable replacement in PowerShell for well over a decade. Keeping unused, ageing tools around forever adds cost and risk for Microsoft with very little benefit.

Second, security. Because wmic was trusted, signed by Microsoft, and built into every Windows computer, attackers loved it. A tool that's already installed and already trusted is far more useful to an attacker than one they have to sneak in themselves - security teams call this a "living-off-the-land" tool. One particular trick, wmic /node:, let someone run commands on a different computer over the network, which attackers used to quietly spread from machine to machine while looking like normal IT activity.

Microsoft Defender (the built-in Windows antivirus and security tool) already has rules that specifically watch for this kind of misuse. Two of its "Attack Surface Reduction" rules directly cover this: one blocks processes started via PSExec or WMI commands, and another blocks a persistence trick that abuses WMI. Removing wmic.exe itself closes the door even further. If your workplace uses Configuration Manager to manage computers, be careful turning on the PSExec/WMI rule everywhere at once - Configuration Manager itself relies heavily on WMI to function, so test it on a few machines first.

Gotcha - don't swap one old tool for another: there's an older PowerShell command called Get-WmiObject that looks like an obvious replacement, but it's also on its way out - it doesn't exist at all in the newer version of PowerShell (PowerShell 7). Skip it. Go straight to Get-CimInstance instead, which works the same way in every current version of PowerShell.

How to verify: is this tool still on your computer?

Before fixing anything, check three things: is the tool itself still there, does Windows think it's installed, and do any of your own scripts still mention it.

Check 1 - is the file still there? This works on any regular computer, no special permissions needed:

PowerShell - anyone can run this
Test-Path "$env:SystemRoot\System32\wbem\wmic.exe" # True = the old tool is still on this computer (for now) # False = it's already gone - anything that calls it will already be broken

Check 2 - what does Windows itself think? Windows keeps a list of optional add-ons, and WMIC used to be one of them. This check needs to be run as an administrator:

PowerShell - run as administrator
Get-WindowsCapability -Online -Name "WMIC*" | Select-Object Name, State # Installed = still switched on for this computer # NotPresent = available to add back, but currently off # Empty result = this computer no longer offers it at all - the normal # state going forward after the 2026 removal

While it still exists on a computer, a normal user can also see it without PowerShell at all:

SettingsSystemOptional featuresAdd an optional feature
  1. Open Settings, then go to System, then Optional features.
  2. Look under Added features and type WMIC in the search box.
  3. On a computer with the August 2026 update installed, it won't appear in the list at all - that's expected, not an error.

Check 3 - the one that actually matters most: do any of your own files still use it? Here's a simple search across one folder:

PowerShell - search a folder of scripts
Get-ChildItem \\contoso.com\netlogon -Recurse -Include *.bat,*.cmd,*.ps1,*.vbs | Select-String -Pattern '\bwmic\b' | Select-Object Path, LineNumber, Line # This lists every file, and every line inside it, that mentions "wmic" # Getting zero results from a folder you KNOW has old scripts in it? # Double check you actually have permission to read that folder first.

Checking every folder by hand is slow, which is exactly why the companion script for this post exists. Get-WmicDependencyReport.ps1 runs all three checks above automatically and writes the results to a spreadsheet (CSV file) you can share with your team. You can download it from the Windows-11-Scripts repository, and you can see it running for real further down this post.

Note on deeper troubleshooting: Windows also keeps a technical activity log for WMI itself (in Event Viewer, under Applications and Services Logs) and a few internal settings in the registry. Neither of these controls or explains the WMIC removal - they're only useful if you're deep in advanced troubleshooting, and Microsoft's own documentation covers them if you ever need to go that far.

The fix: what to type instead

Every old wmic command has a modern replacement using a PowerShell command called Get-CimInstance. Think of it as asking the exact same question, just through a newer, better-supported window. These replacements work the same way on every current version of Windows, and they even work against other computers on the network, not just the one you're sitting at.

Here's a lookup table for the most common commands you're likely to find in old scripts:

Old command (wmic)New command (PowerShell)Notes
wmic qfe list briefGet-CimInstance Win32_QuickFixEngineeringLists installed updates. Get-HotFix does the same thing with a friendlier name.
wmic process list briefGet-CimInstance Win32_ProcessLists running programs.
wmic bios get serialnumberGet-CimInstance Win32_BIOS | Select-Object SerialNumberThe single most common old command out there.
wmic os get versionGet-CimInstance Win32_OperatingSystem | Select-Object Version, BuildNumberShows the Windows version and build number.
wmic logicaldisk get name,freespaceGet-CimInstance Win32_LogicalDiskShows drive letters and free space.
wmic computersystem get modelGet-CimInstance Win32_ComputerSystemShows the manufacturer, model, and memory in one go.
wmic service list briefGet-CimInstance Win32_ServiceLists Windows services, including the account each one runs as.
wmic cpu get nameGet-CimInstance Win32_ProcessorShows the processor name and core count.
wmic product get name,versionGet-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*'Lists installed software. Deliberately NOT the obvious-looking replacement - see the warning below.
Warning - one old command is a trap: you might expect wmic product where name='X' call uninstall to become Get-CimInstance Win32_Product, but don't do that. Microsoft's own documentation warns that simply looking up software this way can accidentally trigger every installed program on the computer to re-check and repair itself in the background - which can cause real slowdowns or even break things, just from asking a question. Use the registry-based command in the table above instead - it's instant and completely safe to run.

If you need to check computers over the network rather than sitting in front of them, the same Get-CimInstance command works remotely too - just add the computer's name:

PowerShell - checking another computer
Get-CimInstance -ComputerName 'PC-0423' -ClassName Win32_BIOS | Select-Object PSComputerName, SerialNumber # Works the same as running it locally, just add -ComputerName # An error here usually means remote access needs to be turned on for # that computer first - ask your IT team about "PowerShell Remoting"
Tip - you don't have to memorise anything: if you're not sure which command replaces an old one, ask PowerShell itself: Get-CimClass -ClassName Win32_*disk* will list every matching option for you to explore.

Can IT policy control this removal? No. Worth saying clearly: there is no setting anywhere - not in Group Policy, not in Intune, not in any admin console - that can stop, delay, or reverse this removal. It happens regardless. The only thing within your control is finding and fixing the old commands before the removal reaches your computers. Here are two practical ways to do that at scale.

Option 1 - search sign-in scripts stored on the company network. These are a classic hiding spot, and IT staff can search them directly:

Group Policy Managementcontoso.comGroup Policy Objects
  1. Open the Group Policy Management tool and pick a policy that runs scripts when someone logs in.
  2. Check its Settings tab to see which script files it actually runs.
  3. Instead of checking each policy one by one, point the companion script at the whole shared folder where these scripts live, and let it search everything at once.
  4. Fix any old command found by editing that script file directly - no policy needs to change, since it's the file itself that gets updated.

Option 2 - run the check automatically across many computers with Intune. If your workplace manages computers through Microsoft Intune, you can deploy the companion script to run itself and report back:

intune.microsoft.comDevicesScripts and remediations
  1. Sign in to intune.microsoft.com and go to Devices > Scripts and remediations.
  2. Choose Platform scripts, then Add > Windows 10 and later.
  3. Give it a name like WMIC dependency report, and upload Get-WmicDependencyReport.ps1.
  4. Assign it to a small test group of computers first.
  5. Once it's run, check the results for each computer under the script's Device status page.

Where does the output actually show up? This trips people up the first time. There's no live terminal window - Intune captures whatever the script prints and shows it back to you in the console, but the exact place depends on which of the two tools above you used:

Gotcha - Intune trims long output: Microsoft documents a hard cap of 2,048 characters of captured output for a Remediation script. Get-WmicDependencyReport.ps1's full walkthrough-style report can run longer than that if it finds a lot of hits, so anything past the limit simply won't show up in the console. That's exactly why the script also supports -ExportCsv - write the full, untruncated detail to a file share or a company reporting tool instead of relying on the console text box.

Now, the remediation question: can any of this actually be fixed automatically? Mostly, no - and it's worth being honest about why. Rewriting an old script that calls wmic means picking the right replacement from the table above, and often testing it against that specific script's logic. That needs a person, not automation. There's no safe way for a script to guess which Get-CimInstance line to substitute into someone else's .bat file.

There's exactly one part of this that CAN be safely automated: putting the old tool back, temporarily, if it's still available on that Windows build. That's not a real fix - it's the same idea as Microsoft's own wmic_dlc.zip stopgap - but it buys a team time to do the real migration work without an outage in the meantime.

Warning - read this before deploying the remediation script: Remediate-WmicDependencies.ps1 only reinstalls the WMIC Feature on Demand as a temporary bridge. It does not fix a single script. If you deploy it, you still have to go and update every script the detection script found - this just stops things from breaking today while that work happens. Once a device is on a build where WMIC has been fully removed (the expected end state after the August 2026 update), this script cannot bring it back at all, and it says so plainly instead of pretending to succeed.

To wire this up as a real, self-healing Intune Remediation - not just a report - use the two scripts below instead of Get-WmicDependencyReport.ps1. They matter because Intune has a strict rule for this feature specifically: a remediation script only runs if the detection script exits with code 1. The standalone report script in this post uses exit code 2 for "found, but not an error," which works fine as a Platform script but will never trigger a paired remediation - Intune is only watching for exit code 1. Detect-WmicDependencies.ps1 and Remediate-WmicDependencies.ps1 follow that exact rule, and Intune also supports deploying the detection script completely on its own, with no remediation attached, if you only want the checking part.

intune.microsoft.comDevicesScripts and remediationsCreate script package
  1. Go to Devices > Scripts and remediations and select Create script package.
  2. Give it a name, e.g. WMIC dependency bridge.
  3. Upload Detect-WmicDependencies.ps1 as the Detection script file, and Remediate-WmicDependencies.ps1 as the Remediation script file. You can leave the remediation script out entirely if you only want detection.
  4. Set Run this script using the logged-on credentials to No, so both scripts run as SYSTEM with the rights they need.
  5. Assign it to a small test group first, and pick a daily schedule.
  6. Check results under Device status, or export them to a CSV for a wider review.

Here's both scripts running for real, back to back, on the same test computer used throughout this post:

PowerShell - genuine output - detection
.\Detect-WmicDependencies.ps1 FOUND: wmic.exe present; WMIC Feature on Demand Installed. Remediation will attempt a temporary bridge; migrate scripts to Get-CimInstance regardless. # Exit code 1 - this is the exact code that tells Intune to run the # paired remediation script next
PowerShell - genuine output - remediation
.\Remediate-WmicDependencies.ps1 NO ACTION NEEDED: wmic.exe is already present on this device. # Exit code 0 - this device already has it, so there was nothing to # bridge. On a device where wmic.exe was already missing, this same # script would either reinstall it or say plainly that it could not.
Tip: the "no action needed" result above is actually the best possible outcome from the remediation script - it means either the device never needed bridging, or a previous run already fixed it. Watch the trend across your fleet over time, not just one run: a shrinking number of devices needing the bridge each week is real migration progress.

Proof it worked: a real check on a real computer

This is a genuine run of the companion script, Get-WmicDependencyReport.ps1, on a real Windows 11 computer, pointed at a small test folder containing one old batch file and one old script file that both use wmic. Nothing here is invented - the folder paths have just been shortened, and anything that could identify the real device has been replaced.

PowerShell - run as administrator - genuine output
.\Get-WmicDependencyReport.ps1 -ScanPath 'C:\Temp\wmic-test' -ExportCsv -CsvPath 'C:\Temp\wmic-report.csv' === STEP 1: Device and OS version === OS : Microsoft Windows 11 Enterprise Version : 10.0.26200 Display version: 25H2 Build (UBR) : 26200.9168 === STEP 2: Is wmic.exe still on this device? === PRESENT : C:\WINDOWS\System32\wbem\wmic.exe (version 10.0.26100.8457) This device still has the legacy client. It will disappear on a future upgrade or update - migrate scripts before that happens. === STEP 3: WMIC Feature on Demand state (needs elevation) === WMIC~~~~ : Installed === STEP 4: Script files containing the word wmic === HIT C:\Temp\wmic-test\inventory.bat : line 3 wmic qfe list brief > C:%TEMP%\hotfixes.txt HIT C:\Temp\wmic-test\inventory.bat : line 4 wmic bios get serialnumber HIT C:\Temp\wmic-test\sub\uninstall-old.vbs : line 2 objShell.Run "wmic product where name=' legacy app' call uninstall /nointeractive" Scanned 3 file(s) under C:\Temp\wmic-test === STEP 5: Scheduled task actions containing wmic === Checked 342 scheduled task(s). === SUMMARY === Script file hits : 3 Scheduled task hits : 0 Failed steps : 0 CSV written : C:\Temp\wmic-report.csv RESULT: wmic dependencies FOUND. Migrate them to Get-CimInstance / Invoke-CimMethod before the removal reaches this device. # Exit code 2 = it worked fine, and it found problems (not an error) # Exit 0 = all clean. Exit 1 = something went wrong with the CHECK itself

Three things in that output are worth pointing out. First, this computer is on the newest version of Windows (25H2) and yet Step 3 still says the old tool is Installed - even though Microsoft's own notice says it should be removed at that point. In practice, whether it lingers depends on each computer's individual update history, which is exactly why the script checks for real instead of guessing from the Windows version number alone.

Second, notice the script found the risky wmic product ... call uninstall pattern inside an old script file - that's the exact command the red warning earlier in this post is about. Third, it also caught a line that quietly saves its result to a text file - the kind of failure that's easy to miss completely, because nothing appears on screen to say it went wrong.

One more thing worth knowing: if a step in the script genuinely can't run - for example, if you forget to run it as an administrator - it says so clearly instead of pretending everything is fine. A result that quietly comes back "clean" because a check secretly failed would be far more dangerous than an honest error message.

Tip: save the spreadsheet (CSV) this script produces each time you run it. After a few weeks of cleaning up old scripts, run it again and compare the two files side by side - a shrinking list of problems is a simple, honest way to show progress to your manager.

One more genuine run, same computer, this time with no -ScanPath given at all - showing what happens when you skip that step:

PowerShell - genuine output - no scan path given
=== STEP 1: Device and OS version === OS : Microsoft Windows 11 Enterprise Version : 10.0.26200 Display version: 25H2 Build (UBR) : 26200.9168 === STEP 2: Is wmic.exe still on this device? === PRESENT : C:\WINDOWS\System32\wbem\wmic.exe (version 10.0.26100.8457) This device still has the legacy client. It will disappear on a future upgrade or update - migrate scripts before that happens. === STEP 3: WMIC Feature on Demand state (needs elevation) === WMIC~~~~ : Installed === STEP 4: Script files containing the word wmic === No -ScanPath given and C:\Scripts does not exist - file scan skipped. Pass -ScanPath to scan your script shares, GPO logon script folders, and package source directories. === STEP 5: Scheduled task actions containing wmic === Checked 342 scheduled task(s). === SUMMARY === Script file hits : 0 Scheduled task hits : 0 Failed steps : 0 RESULT: no wmic dependencies found in the scanned locations. # Notice this does NOT say "clean" the way a genuine full scan would. # It says found in the SCANNED locations, because Step 4 was skipped - # an honest result, not a false all-clear from a check that never ran.

This is the same behaviour described earlier applied to Step 4 specifically: the script never quietly treats "I didn't check" the same as "I checked, and it's fine." Skip -ScanPath and it tells you exactly that, by name, rather than folding it into a falsely reassuring summary line.

References

PowerShell — companion script

Download it from Imran76Awan/Windows-11-Scripts — no sign-in required. It is read-only: it reports and never changes a device or anything in Intune. Validate it in your own environment before relying on the output.

Detect-WmicDependencies.ps1 — Detects whether this device still depends on the legacy wmic.exe client.
Get-WmicDependencyReport.ps1 — Read-only report of WMIC presence and WMIC dependencies on a Windows 11 device.
Remediate-WmicDependencies.ps1 — Reinstalls the WMIC Feature on Demand as a TEMPORARY bridge - it does not
View all scripts on GitHub
Was this post helpful?
React below — no account needed
Share this post
LinkedIn X / Twitter Reddit Bluesky

More from EndpointWeekly

Windows 11
The Enablement Package: How 24H2 Becomes 25H2 in a Reboot (and…
Windows 11 24H2 and 25H2 share one servicing branch and one identical set of system…
Windows 11
Reliability Monitor: the built-in view that answers "what…
Reliability Monitor puts crashes, bugchecks, driver installs and update installs on one…
Windows 11
Attack Surface Reduction rules broke a line-of-business app:…
An ASR rule in Block mode kills an app and tells you nothing but a GUID. Here is the…