Install IIS 7 Management Scripts and Tools
To use IIS command line tools you will need to install IIS Management Scripts and Tools:
- Control Panel; Programs and Features; Turn Windows Features on or off (left hand side)
- In Windows Features box Expand Internet Information Services; Web Management Tools and select IIS Management Scripts and Tools:
- Select OK and wait while it installs.
To Start and Stop a Site from the Command Line
- Open a command prompt: Start, cmd, Enter
- Enter the code below:
%systemroot%\system32\inetsrv\APPCMD START Site [Site.Name]
Replacing [Site.Name] with the site’s name.
The command takes the following format:
APPCMD (command) (object-type) <identifier> < /parameter1:value1 ... >*
You could use this as part of a project build script to reset the site before debugging.