Posted in
Hosting & IIS7,
Windows Powershell |
No Comment | 5,468 views | 16/12/2010 22:05
Simple Powershell function to add new binding to IIS7 Websites.
1
2
3
4
5
6
| Function Add-Binding
{
Param ($Description, $Binding)
New-ItemProperty IIS:\Sites\$Description -Name Bindings -Value @{Protocol="http";BindingInformation="*:80:$Binding"}
} |
Function Add-Binding
{
Param ($Description, $Binding)
New-ItemProperty IIS:\Sites\$Description -Name Bindings -Value @{Protocol="http";BindingInformation="*:80:$Binding"}
}
Description is the name of website in IIS7.