How can we list All the hosted website from command-line on IIS?
As @WolfyUK mentioned, you may need to run the command from the inetsrv directory.
64 Bit:
%windir%\system32\inetsrv\appcmd.exe list site
32 Bit:
%windir%\syswow64\inetsrv\appcmd.exe list site
The list site command will list all sites but you can also:
List Individual Site by Name:
...\appcmd.exe list site /name:"<site_name>"
List Individual Site by Meta ID (Site ID No.):
...\appcmd.exe list site /id:<site_number>
List All Virtual Directories:
...\appcmd.exe list vdir
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With