IIS PowerShell Management

PowerShell is a very powerful command-line and scripting language that can be used to administer applications running on the Windows platform. It is tightly integrated with the .NET Framework and provides full access to existing COM, WMI, and .NET capabilities. PowerShell tasks are executed using cmdlets, which are small pieces of code that perform a specific function. PowerShell can also be used to administer a system remotely, and it can be used to monitor the health or change the configuration of the Windows operating system itself.

This section discusses PowerShell capabilities specific to IIS. Examples of what you can do with IIS from PowerShell include the following:

  • Add, modify, and delete websites and application pools.
  • Stop, start, recycle, and monitor the health of application pools.
  • Enable and disable global modules.
  • Back up and restore a web configuration.
Note
Execute get-command for a list of all the available commands.

This section discusses the following topics:

  • The available IIS PowerShell cmdlets
  • Using the help methods to better understand what the cmdlet does
  • Examples of numerous cmdlets to add, modify, and delete configurations
  • Monitoring and controlling the state of objects
  • Backing up and restoring the IIS configuration

PowerShell IIS Cmdlets

PowerShell works together with the server management objects and allows an administrator to perform a large number of IIS actions. Those objects also expose attributes, such as web ...

Get Professional Microsoft IIS 8 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.