04 November 2011

Start and Stop IIS7 Websites on the Command Line

Sometimes you need to script starting or stopping IIS7 websites e.g. when building projects. I use the following in a command prompt with admin privileges:
%systemroot%\system32\inetsrv\appcmd.exe start site [site name]
and
%systemroot%\system32\inetsrv\appcmd.exe stop site [site name]

No comments:

Post a Comment