O'Reilly logo

Professional Microsoft IIS 8 by Benjamin Perkins, Dennis Glendenning, Scott Forsyth, Jeff Cochran, Kenneth Schaefer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Command-Line Management

One of the tools for command-line management in IIS 8.0 is AppCmd.exe. This one tool contains functions that give the administrator complete control of the web server. A few examples of what you can do include the following:

  • Add, delete, and modify websites and application pools.
  • Stop and start websites and application pools.
  • View information about worker processes and requests.
  • List and modify the configurations of IIS and ASP.NET.

AppCmd.exe provides a consistent set of supported commands for performing queries and tasks against a set of supported object types. You can run these commands individually or in combination with other commands to perform complex tasks or queries.

Object Name Description
site To administer virtual sites
app To administer applications
vdir To administer virtual directories
apppool To administer application pools
config To administer general configuration sections
wp To administer worker processes
request To administer HTTP requests
module To administer server modules
backup To administer server configuration backups
trace To administer failed request trace logs

Supported commands include the following:

  • add
  • clear
  • configure
  • delete
  • inspect
  • install
  • list
  • lock
  • migrate
  • recycle
  • reset
  • restore
  • search
  • set
  • start
  • stop
  • uninstall
  • unlock

AppCmd.exe is located in the %systemroot%\system32\inetsrv directory, which is available only to members of the Administrators group. Additionally, if applicationhost.config, machine.config ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required