New-Web Binding

Adds a binding to a website.

Syntax

New-WebBinding
   [[-Name] <String>]
   [-Protocol <String>]
   [-Port <UInt32>]
   [-IPAddress <String>]
   [-HostHeader <String>]
   [-SslFlags <Int32>]
   [-Force]
   [<CommonParameters>]

Description

The New-WebBinding cmdlet adds a new binding to an existing website.

Examples

Example 1: Add a new site binding

IIS:\> New-WebBinding -Name "Default Web Site" -IPAddress "*" -Port 80 -HostHeader "TestSite"

This command creates a binding on the default website.

Optional Parameters

-Force

Forces the creation of the binding.

Type: SwitchParameter
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-HostHeader

Specifies the host header of the new binding.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-IPAddress

Specifies the IP address of the new binding.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Name

Specifies the name of the website on which this cmdlet creates the new binding.

Type: String
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Port

Specifies the port for the new binding.

Type: UInt32
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Protocol

Specifies the protocol for the new binding. This protocol is usually HTTP, HTTPS, or FTP.

Type: String
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-SslFlags

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
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False