How To Fix “WMIC Is Not Recognized As An Internal Or External Command”

WMIC, or Windows Management Instrumentation Command-Line, is a built-in utility in the Windows operating system that allows you to query, manage, and monitor different systems and network devices on your computer. A…

WMIC is not recognized as an internal or external command

WMIC, or Windows Management Instrumentation Command-Line, is a built-in utility in the Windows operating system that allows you to query, manage, and monitor different systems and network devices on your computer. A regular Windows user can use this tool to obtain information about their computer, such as its serial number, make, model, RAM configuration and capacity, BIOS version, and so much more.

Before being just a command-line tool, WMIC used to provide a complete Graphical User Interface (GUI). However, Microsoft announced that the WMIC UI has been deprecated in Windows 10 version 21H1, and will be deprecated in the following releases as well. This was because it was being superseded by Windows PowerShell for WMI.

That said, the WMI tool is still usable from the Windows command line.

If you are reading this, it is probably because you tried executing a WMIC cmdlet on your system but have ended up with the following error message instead:

WMIC is not recognized as an internal or external command.

This error message does not occur because the tool is deprecated, but it can be due to another reason.

Why is WMIC Not Recognized

If you see the error stated above, it can be due to 2 primary reasons:

  • The Windows Management Instrumentation service is not running.
  • The environmental variable for WMIC no longer exists.

There could be a third reason, which is corrupted system files on your computer. These can be repaired using DISM and SFC command-line tools.

Let us now discuss how to address the other 2 issues and get the WMIC tool working again.

Enable and Start Windows Management Instrumentation Service

First, make sure that the dependency service for WMIC, which is Windows Management Instrumentation, is running. To do so, follow these steps:

  1. Open the Services console by typing in services.msc in the Run Command box.

    Open the Services console
  2. Scroll down and right-click Windows Management Instrumentation service, then click Properties from the context menu.

    Open service properties
    Open service properties
  3. From the Properties window, select Startup Type as Automatic, then click Start. Once the service starts successfully, click Apply and OK to save the changes.

    Enable and start the service
    Enable and start the service

Now check to see if you can run the WMIC cmdlet. If not, then continue to perform the solution given below.

Create Environment Variable for WMIC

As we mentioned above, another reason for the “WMIC not recognized as an internal or external command” is the missing environmental variable. Therefore simply entering the wmic.exe will be insufficient as Windows will not understand which EXE file to run.

You can overcome this problem by either providing the complete path to the WMIC.exe file (given below) or manually creating the environmental variable.


However, if you choose to enter the complete path, you will need to do so each time you want to run the WMIC tool. Therefore, we suggest that you create the variable to save time and effort in the long run.

  1. Type in sysdm.cpl in the Run Command box to open the System Properties applet.

    Open System Properties
  2. From the System Properties window, switch to the Advanced tab and then click Environmental Variables.

    Open environmental variables
    Open environmental variables
  3. Click New under the System variables section.

    Create new variable
    Create new variable
  4. In the pop-up box, type in any custom variable name, and then paste the following path in the text field in front of “Variable value.”

    Add variable details
    Add variable details

    Once done, click OK.

  5. Now click OK on the Environmental Variables and System Properties windows to close them.

  6. Now restart your computer for the changes to take place.

Once it reboots, you should now no longer experience the same error again.

Final Thoughts

Some people may have been confused, and maybe even upset after hearing that WMIC was deprecated. However, after reading this post, you will have understood that that’s not the case.

Furthermore, some guidelines online even suggest that you reinstall WMIC through the Optional Features available from the Settings app in Windows 11. Let us inform you that the method no longer works, as Microsoft has also removed WMIC from the Optional Features.

Frequently Asked Questions

What is the location of wmic.exe?

The WMIC.exe file is located at C:\Windows\System32\wbem\WMIC.exe.

Is WMIC deprecated?

Yes, WMIC has been deprecated, but just the User Interface. You can still use WMIC in the Windows command line.

Latest posts
Patch Tuesday Windows 10
Windows 10 KB5032189 Fixes Touchscreen, Update Installation Issues

Protect your Windows 10 devices with KB5032189 that addresses zero-day vulnerabilities that are actively being exploited.

View post
Windows 11 Known Issues and Solutions
Windows 11 Latest Known Issues And Their Fixes

Each Windows update comes with its own set of issues. Learn what problems there are in the latest Windows updates before installing them, and bypass/fix them if needed.

View post
Patch Tuesday Windows 11
Windows 11 KB5032190 Update Fixes 3 Vulnerabilities, Enables Moment 4 Features

Patch up the zero-day vulnerabilities in Windows 11 with KB5032190.

View post

Leave the first comment