Overview
The WMIC command is deprecated and is being removed from Windows, so scripts and users increasingly see "wmic is not recognized." This guide explains how to re-enable it where possible and how to move to its modern replacement.
Key Takeaways
- WMIC is deprecated and disabled or removed on newer Windows.
- It can sometimes be re-added as an optional feature.
- PowerShell’s CIM cmdlets are the supported replacement.
- Updating scripts to PowerShell is the long-term fix.
Re-enable WMIC
1. Open Settings > Apps > Optional features > Add an optional feature.
2. Search for WMIC.
3. If listed, select it and click Install.
4. Reopen Command Prompt and test the wmic command.
Use the PowerShell Replacement
1. Open PowerShell.
2. Replace wmic queries with Get-CimInstance, for example: Get-CimInstance Win32_OperatingSystem
3. Use Get-CimInstance Win32_BIOS and similar classes as needed.
4. Update your scripts to the CIM cmdlets for future compatibility.
Note: Because WMIC is being retired, migrating to PowerShell CIM cmdlets is the durable solution.
Troubleshooting
Problem: WMIC is not in Optional features.
Solution: On the newest builds it may be fully removed; switch to PowerShell CIM cmdlets instead.
Problem: Scripts still fail after re-enabling.
Solution: Confirm the feature installed and the command runs interactively before relying on it in scripts.
Problem: You are unsure of the CIM equivalent.
Solution: Most Win32_ classes used by wmic work directly with Get-CimInstance.
Problem: WMIC keeps disappearing after updates.
Solution: Feature updates can remove it; standardize on PowerShell to avoid repeated breakage.
Conclusion
The WMIC error reflects its planned removal from Windows. Re-add it temporarily if you must, but migrating to PowerShell’s CIM cmdlets is the lasting fix.
About TechHub
This guide is part of the TechHub Knowledge Base. For more step-by-step IT guides and support, visit techhub.com.lk.















