Once we have IIS Express installed (the easiest way is through Microsoft Web Platform Installer), we will find the executable file in %PROGRAMFILES%\IIS Express (%PROGRAMFILES(x86)%\IIS Express on x64 architectures) and its called iisexpress.exe.
To see all the possible command-line options, just run:
> iisexpress /?
and the program detailed help will show up.
If executed without parameters, all the sites defined in the configuration file and marked to run at startup will be launched. An icon in the system tray will show which sites are running.
But there are a couple of useful options once we have some sites created in the configuration file (found in %USERPROFILE%\Documents\IISExpress\config\applicationhost.config): the /site and /siteId. With the first one, we can launch a specific site by name:
> iisexpress /site:SiteName
And with the latter, we can launch is specifying the ID:
> iisexpress /siteId:SiteId
With this, if iisexpress is launched from the command-line, a list of all the requests made to the server will be shown, which can be quite useful when debugging.
Finally, a site can be launched by specifying the full directory path. IIS Express will create a virtual configuration file and launch the site (remember to quote the path if it contains spaces):
> iisexpress /path:FullSitePath
With this, you already know the basic usage of IIS Express. See the link for more information.
