-
-
Save smartmeter/8243e8bccfe425652e63 to your computer and use it in GitHub Desktop.
Delete all sites from IIS express configuration
This file contains 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.exe list site /xml | appcmd delete site /in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
list site /xml | appcmd delete site /in
//or
$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] }}