Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 862
user3874995 Avatar asked Jul 24 '14 23:07

user3874995


People also ask

How do I access AppCmd?

AppCmd.exe is located in the %systemroot%\system32\inetsrv\ directory. Because it is not part of the PATH automatically, you need to use the full path to the executable when executing commands like in %systemroot%\system32\inetsrv\AppCmd.exe list sites .


2 Answers

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

like image 102
Mohammad Nadeem Avatar answered Sep 22 '22 14:09

Mohammad Nadeem


I think the user has the same problem I did: %systemroot%\system32\inetsrv\ was empty on my machine.

You need to "Turn Windows features on and off", and then select "IIS Management Scripts and Tools" under "Internet Information Services"->"Web Management Tools".

like image 44
Igor Yagolnitser Avatar answered Sep 20 '22 14:09

Igor Yagolnitser