IIS7 appcmd list sites: is there a wildcard to filter on (for i.e. all bindings on port 443)?

7,766

Solution 1

Not in AppCmd but why not pipe it into FINDSTR, for example:

appcmd list sites | findstr /spin hostheader.com

or appcmd list sites | findstr /spin 216.123.123.123:443

Solution 2

Yes you can do this with AppCmd:
%windir%\system32\inetsrv\AppCmd.exe list site /bindings:http/*:8315:

Share:
7,766

Related videos on Youtube

Ted
Author by

Ted

Updated on September 17, 2022

Comments

  • Ted
    Ted over 1 year

    In IIS7, is it possible to filter the results of the appcmd list sites command to, for example, all sites running on port 443?

    For example:

    /appcmd list sites /bindings:http://216.123.123.123:443:*wildcard
    

    As it is, I can only filter on the exact binding such as:

    /appcmd list sites /bindings:http://216.123.123.123:443:some.hostheader.com
    
  • Ted
    Ted almost 14 years
    Perfect! Just what I was looking for.
  • Ted
    Ted almost 14 years
    One caveat is that for the IP you need to "appcmd list sites | findstr 216.123.123.123".