Working with Applications, Virtual Directories, and Application Pools

Appcmd can be an effective way to create and configure many of the key Web server objects, including Web sites, applications, virtual directories, and application pools. The Appcmd Site, App, Vdir, and Apppool objects provide a convenient mechanism for managing these objects, even though you can perform most of the tasks that these objects expose by using the Config object to directly edit configuration files.

The Site object provides a convenient way to enumerate Web sites, as well as to create new Web sites and set configurations on existing Web site definitions. For example, you create a Web site in a single step by using the Add Site command.

ppcmd add site /name:MySite /bindings:http/*:81: ...

Get Internet Information Services (IIS) 7.0 Resource Kit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.