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 Express\appcmd.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 Express\appcmd.exe" list site /xml | app ...
+ ~~~~
Unexpected token 'list' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
In PowerShell, you need to use the call operator (&) to pass parameters/arguments to an executable.
Taken from this page : Cleaning up IIS Express Sites
Variation from a comment on this page :
Open CMD prompt & Navigate to IIS express - by typing the following
This will delete all the sites, enjoy!