Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Remove-AzureDisk

Remove-AzureDisk

microsoft.windowsazure.commands.servicemanagement.dll

Synopsis

Removes a disk from the Microsoft Azure disk repository.

Syntax

Remove-AzureDisk [-DiskName] [-DeleteVHD] [<CommonParameters>]

Detailed Description

The Remove-AzureDisk cmdlet removes a disk from the Microsoft Azure disk repository in the current subscription. By default, this does not delete the associated physical VHD file from the blob storage location. To delete the associated physical VHD, specify the DeleteVHD parameter.

Parameters

-DiskName <String>

Name of the data disk in the disk repository to remove.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DeleteVHD <SwitchParameter>

Removes the underlying VHD from blob storage.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- Example 1 --------------------------

This example removes the "MyDataDisk" disk from the disk repository but does not remove the VHD from Microsoft Azure storage.

PS C:\> C:\PS>Remove-AzureDisk -DiskName "MyDataDisk"

-------------------------- Example 2 --------------------------

This example removes the "MyDataDisk" disk from the disk repository and also removes the VHD from Microsoft Azure storage.

PS C:\> C:\PS>Remove-AzureDisk -DiskName "MyDataDisk" –DeleteVHD

Add-AzureDisk
Get-AzureDisk
Update-AzureDisk