Remove-​Azure​Rm​Sql​Server

Removes an Azure SQL Database server.

Syntax

Remove-AzureRmSqlServer
      [-ResourceGroupName] <String>
      [-ServerName] <String>
      [-Force]
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Remove-AzureRmSqlServer cmdlet removes an Azure SQL Database server.

The delete operation is asynchronous and may take some time, so verify the operation is finished before performing any additional operations that depend on the server being completely deleted. For instance, you need to create a new server that uses the same name.

Examples

Example 1: Remove a server

PS C:\>Remove-AzureRmSqlServer -ResourceGroupName "ResourceGroup01" -ServerName "Server01"

This command removes the Azure SQL Database server named Server01.

Required Parameters

-ResourceGroupName

Specifies the name of the resource group to which the server is assigned.

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

Specifies the name of the server to remove.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel

Outputs

Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel