< Back
Remove-AzureVM
Post
NAME Remove-AzureVM
SYNOPSIS
Removes an Azure virtual machine.
SYNTAX
Remove-AzureVM [-ServiceName] <String> [-Name] <String> [[-DeleteVHD]] [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>]
[-InformationVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
The Remove-AzureVM cmdlet deletes an Azure virtual machine. This process does not delete the underlying .vhd files of the disks mounted on that virtual
machine.
PARAMETERS
-Name <String>
Specifies the name of the virtual machine being removed.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DeleteVHD [<SwitchParameter>]
Specifies whether this cmdlet removes the virtual machine and the underlying disk blobs.
Required? false
Position? 2
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ServiceName <String>
Specifies the name of the Azure service from which the virtual machine is being removed.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Profile <AzureSMProfile>
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationAction <ActionPreference>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationVariable <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
-------------------------- Example 1: Remove a virtual machine from a service --------------------------
PS C:\\>Remove-AzureVM -ServiceName "ContosoService03" -Name "VirtualMachine03"
This command removes the virtual machine named VirtualMachine03 that runs in the ContosoService03 service.
-------------------------- Example 2: Remove a virtual machine and delete the .vhd files --------------------------
PS C:\\>Remove-AzureVM -ServiceName "ContosoService03" -Name "VirtualMachine04" -DeleteVHD
This command removes the VirtualMachine04 virtual machine that runs in the ContosoService03 service, and specifies to remove the .vhd files using the
DeleteVHD parameter.
RELATED LINKS
New-AzureVM
New-AzureVMConfig
Restart-AzureVM
Restart-AzureVM
Stop-AzureVM
Update-AzureVM
SYNOPSIS
Removes an Azure virtual machine.
SYNTAX
Remove-AzureVM [-ServiceName] <String> [-Name] <String> [[-DeleteVHD]] [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>]
[-InformationVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
The Remove-AzureVM cmdlet deletes an Azure virtual machine. This process does not delete the underlying .vhd files of the disks mounted on that virtual
machine.
PARAMETERS
-Name <String>
Specifies the name of the virtual machine being removed.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DeleteVHD [<SwitchParameter>]
Specifies whether this cmdlet removes the virtual machine and the underlying disk blobs.
Required? false
Position? 2
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ServiceName <String>
Specifies the name of the Azure service from which the virtual machine is being removed.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Profile <AzureSMProfile>
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationAction <ActionPreference>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationVariable <String>
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
-------------------------- Example 1: Remove a virtual machine from a service --------------------------
PS C:\\>Remove-AzureVM -ServiceName "ContosoService03" -Name "VirtualMachine03"
This command removes the virtual machine named VirtualMachine03 that runs in the ContosoService03 service.
-------------------------- Example 2: Remove a virtual machine and delete the .vhd files --------------------------
PS C:\\>Remove-AzureVM -ServiceName "ContosoService03" -Name "VirtualMachine04" -DeleteVHD
This command removes the VirtualMachine04 virtual machine that runs in the ContosoService03 service, and specifies to remove the .vhd files using the
DeleteVHD parameter.
RELATED LINKS
New-AzureVM
New-AzureVMConfig
Restart-AzureVM
Restart-AzureVM
Stop-AzureVM
Update-AzureVM