Skip to content

Instantly share code, notes, and snippets.

@philcleveland
Created December 5, 2014 20:24
Show Gist options
  • Select an option

  • Save philcleveland/fe8f4f11c58fc9ad1fc3 to your computer and use it in GitHub Desktop.

Select an option

Save philcleveland/fe8f4f11c58fc9ad1fc3 to your computer and use it in GitHub Desktop.
Removes all IIS Express Sites
$appCmd = "C:\Program Files (x86)\IIS Express\appcmd.exe"
$result = Invoke-Command -Command {& $appCmd 'list' 'sites' '/text:SITE.NAME' }
for ($i=0; $i -lt $result.length; $i++)
{
Invoke-Command -Command {& $appCmd 'delete' 'site' $result[$i] }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment