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

Badges
MCSE
Community

Cozumpark Bilisim Portali
Setting IIS7 Connection Limits for Websites with Powershell
Posted in Hosting & IIS7, Windows Powershell | No Comment | 4,369 views | 16/12/2010 21:55

Powershell function to setting connection limits for websites in IIS7.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Function Set-ConnectionLimits
{
Param ($Description, $MaxBandwidth, $MaxConnection)
 
    If ($MaxBandwidth -ne $Null)
    {
        Set-ItemProperty IIS:\Sites\$Description -Name Limits.MaxBandwidth -Value "$MaxBandwidth"
	}
 
    If ($MaxConnection -ne $Null)
    {    
        Set-ItemProperty IIS:\Sites\$Description -Name Limits.MaxConnections -Value "$MaxConnection"
    }
}

Description is the name of website in IIS7.



Leave a Reply