external help file | Module Name | online version | schema | title | description | keywords | author | manager | ms.date | ms.topic | ms.prod | ms.technology | ms.assetid | ms.author | ms.reviewer |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Microsoft.IIS.PowerShell.Provider.dll-Help.xml |
WebAdministration |
2.0.0 |
New-WebBinding |
powershell, cmdlet |
andreabarr |
jasgro |
2017-10-30 |
reference |
powershell |
powershell |
741FF2B8-A6E2-4A39-8470-2F7CA6CC7808 |
v-anbarr |
brianlic |
Adds a binding to a website.
New-WebBinding [[-Name] <String>] [-Protocol <String>] [-Port <UInt32>] [-IPAddress <String>]
[-HostHeader <String>] [-SslFlags <Int32>] [-Force] [<CommonParameters>]
The New-WebBinding cmdlet adds a new binding to an existing website.
IIS:\> New-WebBinding -Name "Default Web Site" -IPAddress "*" -Port 80 -HostHeader "TestSite"
This command creates a binding on the default website.
IIS:\> New-WebBinding -Name "Default Web Site" -IPAddress "*" -Port 443 -HostHeader "TestSite" -Protocol "https"
This command creates an SSL binding on the default website.
Forces the creation of the binding.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the host header of the new binding.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the IP address of the new binding.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the name of the website on which this cmdlet creates the new binding.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the port for the new binding.
Type: UInt32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the protocol for the new binding. This protocol is usually HTTP, HTTPS, or FTP.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Indicates what type of certificate and certificate storage the new website supports. The acceptable values for this parameter are:
- 0: Regular certificate in Windows certificate storage.
- 1: SNI certificate.
- 2: Central certificate store.
- 3: SNI certificate in central certificate store.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).