title: How to start multiple IIS Express sites via command line
body: <p>My organization has a complex webapp that normally requires opening multiple instances of Visual Studio to run different solutions, and then start up all the API &amp; interface projects via IIS Express and some are .net core.  For my needs, I don't actually need to have VS open, I only need the API &amp; UI projects running in the background</p>
  
  <p>I am trying to build a batch script that will do this for me.  Currently I've got it building each project with <code>msbuild</code>, but I'm having trouble getting the <code>iisexpress</code> stuff to work.</p>
  
  <p>Here's what I have so far.</p>
  
  <pre><code>SET MSBuildPath="%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
  SET IISExpressPath="%ProgramFiles(x86)%\IIS Express\IISExpress.exe"
  SET ACPath=%HOMEPATH%\Workspace\MyProject
  SET ConfigFile=%ACPath%\.vs\config\applicationhost.config
  
  %MSBuildPath% "%ACPath%\Project1API\Project1API.csproj" /verbosity:quiet
  %MSBuildPath% "%ACPath%\Project2API\Project2API.csproj" /verbosity:quiet
  %MSBuildPath% "%ACPath%\Project3API\Project3API.csproj" /verbosity:quiet
  
  %IISExpressPath% /site:Project1API /config:%ConfigFile%
  start "" http://localhost:1106
  
  %IISExpressPath% /site:Project2API /config:%ConfigFile%
  start "" http://localhost:49418
  
  %IISExpressPath% /site:Project3API /config:%ConfigFile%
  start "" http://localhost:50244
  
  dotnet run -p "%ACPath%\SubFolder\Project4API\Project4API.csproj"
  start "" http://localhost:60711
  
  dotnet run -p "%ACPath%\SubFolder\ProjectInterface\ProjectInterface.csproj"
  start "" http://localhost:54225
  </code></pre>
  
  <p>Here's what I get as console output</p>
  
  <pre><code>C:\Users\MyUserName\Workspace&gt;"C:\Program Files (x86)\IIS Express\IISExpress.exe" /site:Project1API /config:\Users\MyUserName\Workspace\Project1API\.vs\config\applicationhost.config
  Starting IIS Express ...
  Successfully registered URL "http://localhost:1106/" for site "Project1API" application "/"
  Successfully registered URL "https://localhost:44300/" for site "Project1API" application "/"
  Registration completed for site "Project1API"
  IIS Express is running.
  Enter 'Q' to stop IIS Express
  </code></pre>
  
  <p>The issue seems to be that the first one starts up in IIS Express just fine, but then it hangs there and does not continue on to the next one.  This makes sense, however I need a way to start multiple sites at once.</p>