opentable/puppet-iis — pull request #16 by calebfornari (2013-12-31 23:06:07+00:00)
Title: Handle cases where IIS has zero existing sites.

On Server 2008 and Windows 7 the PShell WebAdministration module throws an index out of range exception when creating a new site if IIS has zero existing sites. This is rare since IIS comes with a default site, but is really annoying to troubleshoot when it happens.

See this for details of the error: http://forums.iis.net/t/1159761.aspx

The solution is to manually index existing sites and assign the next available ID when calling New-Website by adding the -ID flag.