Remove-AzStackHCIVMVirtualHardDisk
The operation to delete a virtual hard disk.
Syntax
Remove-AzStackHCIVMVirtualHardDisk
[-SubscriptionId <String>]
-ResourceId <String>
[-Force]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzStackHCIVMVirtualHardDisk
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-Force]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The operation to delete a virtual hard disk.
Examples
Example 1: Remove a Virtual Hard Disk
Remove-AzStackHCIVMVirtualHardDisk -Name "testVhd" -ResourceGroupName "test-rg"
This command removes the virtual hard disk from the specified resource group.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Forces the cmdlet to remove the virtual hard disk without prompting for confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Name of the virtual hard disk
Type: | String |
Aliases: | VirtualHardDiskName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NoWait
Run the command asynchronously
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group. The name is case insensitive.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
The ARM Resource ID of the virtual hard disk.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
The ID of the target subscription.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
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: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure PowerShell