Introduction
The appcmd.exe is a single command, used to manage IIS 7 and above. It is used to manage the Server without using a graphical administration tool. The appcmd is located in C:\Windows\System32\inetsrv (%systemroot%\system32\inetsrv\) directory. By default, it will not add into environment variable.
Key Features
- Creating and configuring the sites.
- To list the running worker process.
- Backup and restoring the site configuration.
- Retrieve the information about the Application pools.
Object Types
- List
- Add
- Delete
- Set
- Hide
Syntax
- appcmd <objecttypes> <parameters>
- set path=%path%;%systemroot%\system32\inetsrv; //used to set the environment variable
To list all the sites, use the command, given below:
- appcmd list sites
- appcmd list site "Default web site"
- appcmd list sites /state:Stopped
- appcmd add site /name:"added using appcmd" /bindings:"http/*:81:localhost" /physicalPath:"D:\test"
- appcmd set site /site.name:"added using appcmd" /+bindings.[protocol='https',bindingInformation='127.0.0.1:444:localhost']
- Appcmd list app
- appcmd set app "added using appcmd/app1" /applicationPool:appcmdpool
- appcmd list apppool "MyAppPool" /text:*
- appcmd add backup
- appcmd add backup "locahostbkup"
- appcmd list backup
- appcmd delete backup "backup name"
- appcmd restore backup "locahostbkup "
- appcmd restored configuration from backup "locahostbkup"
- appcmd list wps
- appcmd list vdirs /text:physicalPath
- appcmd start site "Default web site"
- appcmd stop site "Default web site"

Anu VPosted Aug 24, 2016, 12:32 AM
Nice.