Created
December 5, 2014 20:24
-
-
Save philcleveland/fe8f4f11c58fc9ad1fc3 to your computer and use it in GitHub Desktop.
Removes all IIS Express Sites
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $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