Skip to content
Windows

How to Add or Remove WMIC Command Feature in Windows 11

Richard
Written by
Richard
Updated 6 min read
How to Add or Remove WMIC command Feature in Windows 11
How to Add or Remove WMIC command Feature in Windows 11
Before you start
  • 6 steps
  • Needs administrator rights
  • Includes a restart or sign-out

WMIC (Windows Management Instrumentation Command-line) is a tool that lets you check and change computer settings with text commands. Microsoft turned it off by default starting in Windows 11 version 22H2, and Windows 11 versions 24H2 and 25H2 no longer include it.

Microsoft is rolling the removal out gradually, so some PCs lose WMIC later than others. WMI itself, the management system underneath, remains supported. Microsoft’s release notes (Windows news you can use: August 2026) say scripts that use WMIC should move to PowerShell or a supported WMI programming interface.

Older scripts, installers and hardware tests still call WMIC and fail if it is missing. This guide shows how to add the optional feature back, or remove it, on a PC that still offers it.

⚡ Quick Answer

Open Windows Terminal as administrator and run DISM /Online /Add-Capability /CapabilityName:WMIC~~~~ to add WMIC back, or the /Remove-Capability version to remove it. The command reports success when it finishes. On Windows 11 24H2 and 25H2 PCs that have the August 2026 update, the add command fails, so use PowerShell with Get-CimInstance instead.

Advertisement

Why You Might Need This

Trimming down a Windows 11 installation often involves removing optional components like WMIC. An optional feature is a Windows component that is not installed until you ask for it. If a script or legacy tool needs WMIC later, you can reinstall it with a single command, as long as your PC still offers it.

⚠️WarningThat last condition matters. Starting in August 2026, Windows 11 versions 24H2 and 25H2 no longer include WMIC, and it is no longer available as a Feature on Demand (a component Windows downloads when you request it). On a PC that has this update, the add command cannot bring WMIC back. Use PowerShell instead.
Advertisement

PowerShell replaces most WMIC queries with the Get-CimInstance cmdlet (a built-in PowerShell command). You give it the name of a WMI class, and it returns the same data WMIC showed. These are the classes behind the most common WMIC aliases:

  • The os alias maps to the Win32_OperatingSystem class.
  • The bios alias maps to Win32_BIOS.
  • The cpu alias maps to Win32_Processor.
  • The diskdrive alias maps to Win32_DiskDrive.

To migrate a script, replace each WMIC call with Get-CimInstance and the matching class name. Then read the properties you need from the result. Because WMI is still supported, these classes keep working on PCs without WMIC.

The steps below are the same on Home and Pro editions of a currently supported Windows 11 version (25H2 or 26H2), apart from the availability limit above. Windows 11 24H2 Home and Pro reached end of updates on October 13, 2026.

Important: Admin Rights Required

⚠️ Administrator privileges are required to add or remove WMIC.

Advertisement

If you open the terminal without admin rights, the command fails with an access error. Close the window and reopen it as administrator. Adding the feature may also need an internet connection, because Windows can download it through Windows Update.

How to Add or Remove WMIC Using Commands

These steps install WMIC on Windows 11 if your PC still offers it, or remove it if you no longer need it.

  1. Right-click the Start button and select Terminal (Admin). On some builds the entry is labelled Windows Terminal (Admin).
  2. Click Yes if the User Account Control prompt appears. A terminal window opens, usually with a Windows PowerShell tab.
  3. Pick PowerShell or Command Prompt. PowerShell works fine. To use Command Prompt, click the down arrow next to the plus tab and select Command Prompt. Either one runs the commands below.
  4. Paste the add command and press Enter. Use this one only if you want to add WMIC.

    DISM /Online /Add-Capability /CapabilityName:WMIC~~~~

    Wait for the progress to finish. You should see a message that the operation completed successfully. If Windows cannot find the feature, your PC no longer offers WMIC.
  5. Paste the remove command and press Enter. Use this one only if you want to remove WMIC, and skip it if you just added the feature.

    DISM /Online /Remove-Capability /CapabilityName:WMIC~~~~

    Wait for the success message again. Run only one of the two commands, depending on what you want.
  6. Close Windows Terminal. You can do this once the success message appears.
⚠️WarningThat’s it. WMIC is now added to or removed from your PC, depending on the command you ran. To undo either change, run the other command in an admin terminal. Undoing a removal works only while your PC still offers WMIC.
Advertisement
Windows PowerShell terminal showing DISM command to add WMIC
Windows PowerShell terminal showing DISM command to add WMIC

What Happens Next?

Windows processes the installation or removal command immediately. Restart your PC to apply the changes fully, especially if a script or app still behaves as if WMIC is in its old state.

After the restart, WMIC is available to your scripts and tools if you added it. If you removed it, anything that depends on it reports that the command is not found.

Summary

If a script fails with “command not found” after a feature update, WMIC is probably gone from your PC, and the add command will not bring it back. Rewrite the script with Get-CimInstance or another supported WMI interface. Where the add command still works, run the remove command later to take WMIC off again.

References:

Frequently asked questions

How to add wmic to 🪟 Windows 11?

To add WMIC, open Settings, go to System, then select Optional features. Choose Add a feature, find WMIC in the list, select it, and click Install. If WMIC does not appear in the list, your version of Windows 11 no longer offers it, and you will need another method.

How to enable wmic on 🪟 Windows 11?

To turn on WMIC, open Settings, select System, then Optional features, and choose Add a feature. Check WMIC and select Install. Restart the PC if prompted. If WMIC is missing from the list, Microsoft has removed it from your version of Windows 11.

How to install wmic on 🪟 Windows 11?

To install WMIC from Command Prompt, open Command Prompt as administrator and run DISM /Online /Add-Capability /CapabilityName:WMIC~~~~. When it finishes, type wmic and press Enter to confirm it runs. An error means your Windows build no longer includes the feature.

How to run wmic in 🪟 Windows 11?

To run WMIC, open Command Prompt or Windows Terminal, type wmic, and press Enter. To run a single query, type something like wmic os get caption. WMIC must be installed first. For new scripts, Microsoft recommends PowerShell instead.

How to unistall just installed wmic in win11?

To uninstall WMIC, open Settings, go to System, select Optional features, choose WMIC, and click Uninstall. You can also run DISM /Online /Remove-Capability /CapabilityName:WMIC~~~~ in an administrator Command Prompt. Scripts that call WMIC will fail after removal.

How to recover wmic on 🪟 Windows 11?

You can recover WMIC only if your PC still lists it under Optional features. Select Add a feature and install it from there. On Windows 11 versions 24H2 and 25H2, where the feature has been removed, use PowerShell cmdlets such as Get-CimInstance in place of WMIC commands.

Still have a question?

Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.

Tags: #Windows 11

Did this guide fix your problem?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.

Advertisement

No comments yet — be the first to share your thoughts!

Leave a Comment

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