Setting a website's application pool in IIS using Powershell Setting a website's application pool in IIS using Powershell powershell powershell

Setting a website's application pool in IIS using Powershell


Set-ItemProperty iis:\Sites\swmarket -Name applicationpool -Value swmarket

Alternatively, with Powershell 3, you could do this:

New-WebAppPool -Name $WebSiteNameNew-Website -Name $WebSiteName -ApplicationPool $WebSiteName -HostHeader $WebSiteName -PhysicalPath $PathInfo -Port 80Set-Content $PathInfo\default.htm “PSCreated Default Page”

Check out the MS Technet description here.