search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Changing status of a IIS7 website with Powershell
Posted in Hosting & IIS7, Windows Powershell | No Comment | 3,377 views | 16/12/2010 21:57

Simple function to just start and stop a website with Powershell.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Function Change-IISStatus
{
Param ($Description, $Status)
 
    If ($Status -eq "0")
    {
        Stop-Website "$Description"
	}
 
    If ($Status -eq "1")
    {    
        Start-Website "$Description"
    }
}

Description is the name of website in IIS7.



Leave a Reply