Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

list All the hosted website from command line on IIS

How can we list All the hosted website from command-line on IIS?

like image 639
Javed Akhtar Avatar asked Dec 06 '12 13:12

Javed Akhtar


1 Answers

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
like image 132
Timothy C. Quinn Avatar answered Sep 28 '22 00:09

Timothy C. Quinn