How do I remotely stop a website in IIS7, in Windows 2008, via command line?


IISReset takes a computer name:

IISReset <Computer> -Stop

The easiest way I can think of by using a command line would be to use Powershell remoting and issue the standard iisreset /stop

If you can not use powershell, look at sysinternals PsExec - http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

This will allow you to use iisreset /stop remotely.

If you do not want either of these two, you can always do it via the gui - download the admin tools - http://www.iis.net/extensions/AdministrationPack - and right click the computer object, type the computer name and then stop/restart from that.


If you want to do this from a remote command line, you could use Microsoft/Sysinternal's PsExec and issue this command:

iisreset -stop

If you want to do that for individual sites, you could use the appcmd tool which was introduced in IIS 7:

appcmd stop site <identifier>

This could also be interesting for remote administration of IIS 7:

Remote Administration for IIS Manager (on learn.iis.net)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy