Remove-AzSqlVM

Deletes a sql virtual machine.

Syntax

Remove-AzSqlVM
      [-ResourceGroupName] <String>
      [-Name] <String>
      [-AsJob]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzSqlVM
      [-InputObject] <AzureSqlVMModel>
      [-AsJob]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzSqlVM
      [-ResourceId] <String>
      [-AsJob]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-AzSqlVM cmdlet deletes a sql virtual machine.

Examples

Example 1

PS C:\> Remove-AzSqlVM -ResourceGroupName "ResourceGroup01" -Name "vm"

Deletes the Azure SQL virtual machine "vm" in the resource group ResourceGroup01.

Parameters

-AsJob

Run cmdlet in the background.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

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

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

SQL virtual machine object.

Type:AzureSqlVMModel
Aliases:SqlVM
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Name

SQL virtual machine name.

Type:String
Aliases:SqlVMName
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

Specifies whether to output the deleted resource at end of cmdlet execution.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

The name of the resource group.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceId

SQL virtual machine resource id.

Type:String
Aliases:SqlVMId
Position:0
Default value:None
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:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

AzureSqlVMModel

Outputs

AzureSqlVMModel