Remove-WebSitesDatabase

Remove-WebSitesDatabase

Removes a Web Sites database.

Syntax

Parameter Set: Default
Remove-WebSitesDatabase [-Type] {Hosting | Metering} [-ConnectionString] <String> [-Force] [-PipelineVariable <String> ] [-RemoveLogin <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]


 

Detailed Description

The Remove-WebSitesDatabase removes a Web Sites database. Specify whether this is a hosting or metering database by using the Type parameter.

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?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-Force

Forces the command to execute without asking for user confirmation.                                  

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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

 

-RemoveLogin<String>

Specifies the login name to remove.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 


-Type<DatabaseType>

Specifies the database type. Valid values are:

-- Hosting

-- Metering

The acceptable values for this parameter are:

 

Hosting

 

Metering

 

 

 

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: Remove a hosting database

This command removes the hosting database.

PS C:\> Remove-WebSitesDatabase -Type Hosting -ConnectionString "Data Source=CN-SERVER01;Initial Catalog=Hosting;User ID=Hosting_HostingAdmin;Password=Password01!"

 

Related topics

Update-WebSitesDatabase