Remove-WebSitesHostName

Removes a host name from a website.

Syntax

Remove-WebSitesHostName
      [-SiteName] <String>
      [[-Name] <String>]
      [-ConnectionString <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-WebSitesHostName cmdlet removes a host name from a website.

Examples

Example 1: Remove a host name from a site

PS C:\> Remove-WebSitesHostName -SiteName "Site01" -Name "support.contoso.com"

This command removes the host name support.contoso.com from Site01.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConnectionString

Specifies a connection string for a hosting database. Connection strings contain information about a data source and how to connect to it; this information includes such things as the server and database name, and the name and password of the user account making the connection. For example:

-ConnectionString "Server=tcp:contosodb.database.windows.net;Database=Personel;User ID=admin@contoso.com;Password=p@ssw0rd;Trusted_Connection=False;Encrypt=True;"

If you do not specify this parameter Remove-WebSitesHostName uses the default instance of the hosting database.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the host name being removed. For example:

-Name "contoso-internal.contoso.com"

Type:String
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-SiteName

Specifies the name of the site associated with the host name being deleted. For example:

-SiteName "ContosoSite"

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False