New-WebSitesHostName

New-WebSitesHostName

Adds a host name to a tenant web site.

Syntax

Parameter Set: Default
New-WebSitesHostName [-SiteName] <String> [-Name] <String> [-ConnectionString <String> ] [-PipelineVariable <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]


 

Detailed Description

The New-WebSitesHostName cmdlet adds a host name to a tenant web site.

Parameters

-ConnectionString<String>

Specifies a connecting string to a hosting database. If this parameter is not specified, the default instance of the hosting database is used.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-Name<String>

Specifies a host name.

 

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-PipelineVariable<String>

Specifies a variable to be used with the pipeline operator.

 

Aliases

pv

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-SiteName<String>

Specifies the name of a site.

 

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-Confirm

Prompts you for confirmation before executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Examples

Example 1: Add a host name to a site

This command adds the host name NewHostName.Contoso.com to the site named Site01.

PS C:\> New-WebSitesHostName -SiteName "Site01" -Name NewHostName.Contoso.com

 

Related topics

Get-WebSitesHostName

Remove-WebSitesHostName