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

WMIC is not recognized as an internal or external commandWMIC 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.

    services
    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.

C:\Windows\System32\wbem\WMIC.exe

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.

    sysdm
    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.”

    C:\Windows\System32\wbem\WMIC.exe
    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.

If you liked this post, Share it on:

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information

Subhan Zafar is an established IT professional with interests in Windows and Server infrastructure testing and research, and is currently working with Itechtics as a research consultant. He has studied Electrical Engineering and is also certified by Huawei (HCNA & HCNP Routing and Switching).

Leave the first comment