New-WebBinding

New-WebBinding

Adds a new binding to an existing Web site.

Syntax

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

Detailed Description

Adds a new binding to an existing Web site.

Parameters

-Force

Forces the creation of the binding.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-HostHeader<String>

The host header of the new binding.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-IPAddress<String>

The IP address of the new binding.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

The name of the Web site on which the new binding is created.

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Port<UInt32>

The port used for the binding.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Protocol<String>

The protocol to be used for the Web binding (usually HTTP, HTTPS, or FTP).

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-SslFlags<Int32>

Indicates what type of certificate and/or certificate storage the new website supports. Only the following values are valid: 0 (Regular certificate in Windows certificate storage), 1 (SNI certificate), 2 (central certificate store), or 3 (SNI certificate in central certificate store).

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

-------------- EXAMPLE 1: Adding a new Site Binding --------------

Creates a new binding on the Default Web Site.

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