“wmic is not recognized” in Windows 11: why WMIC is gone and what to use instead

Quick answer: 'wmic' is not recognized as an internal or external command means the WMIC tool isn’t on your PC. Microsoft has removed it from Windows 11: updated 24H2 and 25H2 PCs lost it with the August 2026 preview update, 26H1 with the September 2026 preview update, and it can no longer be added back from Optional features. The fix is to use PowerShell instead, for example (Get-CimInstance Win32_BIOS).SerialNumber in place of wmic bios get serialnumber. WMI itself still works; only the wmic.exe command-line front end is gone.

Why wmic stopped working

WMIC has been on its way out for years. Microsoft’s WMIC removal article (KB5067470) and its deprecated features list give this timeline:

WhenWhat happened
Windows 10 21H1WMIC deprecated in favour of PowerShell
Windows 11 22H2WMIC became an optional feature (Feature on Demand), still installed by default
Windows 11 24H2WMIC turned off by default, but could be added back
Windows 11 25H2Upgrading removed WMIC; it could still be added back
August 2026 (24H2, 25H2)Removed completely by the preview update; no longer available as an optional feature
September 2026 (26H1)Removed by that month’s preview update

Microsoft’s WMIC documentation now says the tool can’t be added back as a Feature on Demand on 24H2 and 25H2. The removal covers Windows 11; the KB doesn’t list Windows 10. To see which version you’re on, run winver.

On an older build: add it back for now

On a 24H2 or 25H2 PC that hasn’t installed the August 2026 preview update or anything later, or on 23H2, WMIC may still be listed as an optional feature:

  1. Open Settings > System > Optional features.
  2. Select View features next to Add an optional feature and search for WMIC.
  3. If it appears, tick it, select Next and then Install.

If WMIC isn’t in the list, your PC has the removal and this route is closed. Even where it works, the next update will remove WMIC, so treat it as time to move scripts to PowerShell.

Replace wmic commands with PowerShell

Microsoft’s recommended replacement is the PowerShell CIM cmdlets, mainly Get-CimInstance and Invoke-CimMethod. They read the same WMI classes WMIC used. Microsoft’s own example turns wmic path win32_process get Name into Get-CimInstance Win32_Process | Select-Object Name. The table below applies the same pattern to common commands; it’s our mapping, not an official Microsoft list:

Old WMIC commandPowerShell replacement
wmic bios get serialnumber(Get-CimInstance Win32_BIOS).SerialNumber
wmic os get caption,version,buildnumberGet-CimInstance Win32_OperatingSystem | Select-Object Caption,Version,BuildNumber
wmic cpu get name,numberofcoresGet-CimInstance Win32_Processor | Select-Object Name,NumberOfCores,NumberOfLogicalProcessors
wmic memorychip get capacity,speedGet-CimInstance Win32_PhysicalMemory | Select-Object Manufacturer,Capacity,Speed
wmic logicaldisk get caption,size,freespaceGet-CimInstance Win32_LogicalDisk | Select-Object DeviceID,Size,FreeSpace
wmic qfe list briefGet-HotFix
wmic baseboard get product,serialnumberGet-CimInstance Win32_BaseBoard | Select-Object Manufacturer,Product,SerialNumber
wmic useraccount get name,sidGet-LocalUser | Select-Object Name,SID
wmic path softwarelicensingservice get OA3xOriginalProductKey(Get-CimInstance SoftwareLicensingService).OA3xOriginalProductKey
wmic process get nameGet-CimInstance Win32_Process | Select-Object Name
wmic process call create "notepad.exe"Invoke-CimMethod -ClassName Win32_Process -MethodName Create -Arguments @{CommandLine='notepad.exe'}
wmic process where name="notepad.exe" deleteStop-Process -Name notepad

A few things to watch:

  • Disk sizes and memory capacity come back in bytes, as they did in WMIC.
  • For a remote PC, WMIC’s /node: becomes -ComputerName on Get-CimInstance.
  • Get-WmiObject also works in Windows PowerShell 5.1, but it doesn’t exist in PowerShell 7, so Get-CimInstance is the safer choice.
  • The product key line returns nothing on PCs without a key stored in the firmware. See how to find your Office product key for keys of a different kind.

Use PowerShell inside a batch file

If an old .bat or .cmd file calls WMIC, Microsoft suggests calling PowerShell from it instead. For example:

powershell -NoProfile -Command "(Get-CimInstance Win32_BIOS).SerialNumber"

Keep the PowerShell part in double quotes and use single quotes inside it. For update-related scripts, our list of Windows Update commands for CMD and PowerShell has more examples.

Don’t replace wmic product with Win32_Product

Many scripts used wmic product get name to list installed programs. The direct PowerShell version, Get-CimInstance Win32_Product, has a known side effect: Microsoft’s troubleshooting article says querying it starts a consistency check of every installed MSI package and can repair or reconfigure them. That makes it slow and can log a burst of Windows Installer events. Read the uninstall registry keys instead:

Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*, HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* |
  Where-Object DisplayName | Select-Object DisplayName, DisplayVersion | Sort-Object DisplayName

Microsoft’s temporary WMIC package

For apps or scripts that can’t be changed yet, KB5067470 links a download that restores WMIC with an install script. Microsoft says it isn’t a secure, long-term solution, should only be used at your discretion, and that you should move away from it as soon as possible. On a work PC, leave that decision to IT.

Fixes that don’t apply any more

Older guides suggest restarting the Windows Management Instrumentation service, or adding C:\Windows\System32\wbem to the PATH variable. Those only help when wmic.exe is still on the PC but can’t be found. On a current Windows 11 build the file is gone, so they won’t bring the command back. Copying wmic.exe from another PC isn’t supported either. If another command-line tool is missing, see winget is not recognized.

Official sources

How we write our guides: read our editorial policy.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *