I have a script that uses appcmd
to find sites using a particular vdir
and iterates through them to find which ones are currently running
appcmd.exe list vdir /physicalPath:Z:\My\Path
:: save sites to array
:: foreach SiteName in array
appcmd.exe list site SiteName
:: hunt for "Started" in the output
but I would like to directly filter down to running sites using said virtual directory. I have expectations that there's a /parameter:value
that does exactly that, but I can't seem to find a list of possible parameters.
Best would be arguments on the
list vdir
call that render thelist site
unnecessary.Second best would be a filter on the
list site
call that removes the need to hunt for "Started"If there is a (complete) list of
appcmd
parameters on MSDN, TechNet, or somewhere that proves this is not possible, that would also be helpful.
PowerShell
insteadappcmd
processing is actually Python. I'll take thePS
recommendation under advisement, though.