Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am trying to clear up the IISExpress Cache from the powershell. Using this code it complains about the list.

"C:Program Files (x86)IIS Expressappcmd.exe" list site /xml | appcmd delete site /in

How can I clear up the sites and the IIS Express cache?

At line:1 char:50
+ "C:Program Files (x86)IIS Expressappcmd.exe"  list site /xml | app ...
+                                                  ~~~~
Unexpected token 'list' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

Open CMD prompt & Navigate to IIS express - by typing the following

cd "C:Program Files (x86)IIS Express"

run this appcmd.exe list site /xml | appcmd delete site /in

This will delete all the sites, enjoy!

Update for PowerShell Version Thanks to @sibbij

cd "C:Program Files (x86)IIS Express"

run this ./appcmd.exe list site /xml | ./appcmd delete site /in


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...