title: Powershell List of WebSites and the removal of sites in "Stopped" state
body: <p>I'm looking for a way to remove all IIS sites in a "Stopped" state. Can someone show me a powershell script to do this?</p>
  
  <pre><code>Get-Website | select name,id,state
  </code></pre>
  
  <p>The above lists the websites, the ID of the site and the state what I've been unable to figure out is how to only list State=Stopped and how to use the Remove-Website based on the state=Stopped</p>
  
  <p>The following command produces no output and no error;</p>
  
  <pre><code>Get-Website | Where-Object {$_.status -eq "Stopped"}
  </code></pre>
  
  <p>I hit the post button to soon, thanks...</p>
  
  <p>Thanks!</p>