Chris's coding blog

Starting and stopping all IIS sites in Powershell

November 17, 2014

This is just a boring Powershell 4 snippet for starting and stopping IIS websites:

Import-Module WebAdministration
Get-ChildItem -Path IIS:\Sites | foreach { Stop-WebSite $_.Name; }
Get-ChildItem -Path IIS:\Sites | foreach { Start-WebSite $_.Name; }
misc

I'm Chris Small, a software engineer working in London. This is my tech blog. Find out more about me via GithubStackoverflowResume