Remove-IscsiVirtualDisk

Deletes a virtual disk object, without deleting the virtual hard disk (VHD) file.

Syntax

Remove-IscsiVirtualDisk
      [-Path] <String>
      [-ComputerName <String>]
      [-Credential <PSCredential>]
      [<CommonParameters>]
Remove-IscsiVirtualDisk
      -InputObject <IscsiVirtualDisk>
      [-ComputerName <String>]
      [-Credential <PSCredential>]
      [<CommonParameters>]

Description

The Remove-IscsiVirtualDisk cmdlet deletes the iSCSI virtual disk object. The virtual hard disk (VHD) file is not deleted.

Examples

Example 1: Delete a virtual disk

PS C:\> Remove-IscsiVirtualDisk -Path "E:\temp\vhd1.vhdx"

This example deletes a virtual disk that has the path E:\temp\vhd1.vhdx.

Parameters

-ComputerName

Specifies the computer name, or IP address, of the remote computer, if this cmdlet is run on a remote computer.

Specifies the cluster resource group network name, or cluster node name, if this cmdlet is run on a cluster configuration.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Credential

Specifies the credentials when connecting to a remote computer.

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-InputObject

Accepts an iSCSI virtual disk object from the input pipeline.

Type:IscsiVirtualDisk
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Path

Specifies the path of the VHD file that is associated with the iSCSI virtual disk. Filter the iSCSI virtual disk object by using this parameter.

Type:String
Aliases:DevicePath
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

Microsoft.Iscsi.Target.Commands.IscsiVirtualDisk

Outputs

None