The term 'appcmd' is not recognized as the name of a cmdlet

user3874995 picture user3874995 · Jul 25, 2014 · Viewed 35.7k times · Source

I'm getting the following error message:

The term 'appcmd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:7

Answer

Mohammad Nadeem picture Mohammad Nadeem · Jul 25, 2014

Appcmd.exe exists at the location %systemroot%\system32\inetsrv\. You either need to update your PATH variable to add the path %systemroot%\system32\inetsrv\ like

SET PATH=%PATH%;%systemroot%\system32\inetsrv\

or you can use Set-Location to first go to the location of Appcmd.exe like

Set-Location %systemroot%\system32\inetsrv\

and then run you command.

OR you can use the following:

c:\windows\system32\inetsrv\appcmd.exe