05.06.08

Powershell Provider for IIS7

Posted in Work at 1:09 pm by JohnB

I just found out that there is now available a Powershell Provider for IIS7. This VERY cool piece of Powershell gubbins allows you, in very easy steps, to:-

  • Create Web-Sites, Web Applications, Virtual Directories and Application Pools
  • Change Simple Configuration Properties on Web-Sites, Application Pools, Web Applications and Virtual Directories
  • Add and Change Complex Configuration Settings
  • Query Run-time Data (Web-Site State, Application Pool State, Currently Executing Requests)
  • Execute Advanced Configuration Tasks, Scripting, Integration with other PowerShell Snap-Ins and features
  • Search and Discover Configuration Settings

Here’s a very quick example of how powerfull this stuff is… with the Provider installed the following powershell command creates a site in IIS7! (Line break for formatting purposes!)

New-Item iis:\Sites\TestSite -bindings @{protocol="http";bindingInformation=":80:TestSite"}
 -physicalPath c:\test

This is going to be REALLY useful for anyone who wants to automate the deployment of IIS7 web sites and services on Windows Server 2008. For a full walk-through of this fantastic addition to Powershell check out the learn.iis.net site.

- J.

Leave a Comment

You must be logged in to post a comment.