IIS 7 and Above
restart remote websites
Last post Oct 14, 2009 05:50 AM by rkr31
Oct 06, 2009 11:12 AM|amackan|LINK
Hi, running iis7 on our network. i need to write a script that will stop a particular website on our internal web server and the associated apppool. we currently use iisweb to do this on our iis6 server.
can some one point me in the right direction. my desktop pc is vista 32 bit running powershell 1 with the IIS7 powershell tools installed.
Oct 13, 2009 12:00 AM|Leo Tang - MSFT|LINK
Please check the following article:
How Can I Use Windows PowerShell to Start a Service on a Remote Computer?
Oct 14, 2009 05:50 AM|rkr31|LINK
Here is one i created to do the same. Just pass it the name of your site (It assumes that your pool is the same name as the site. )
### Get the parameters from the command line
### Import all the modules we need
Import-module WebAdministration | out-null
### Restart the site