Remove-IscsiVirtualDisk
Deletes a virtual disk object, without deleting the virtual hard disk (VHD) file.
Syntax
DevicePath (Default)
Remove-IscsiVirtualDisk
[-Path] <String>
[-ComputerName <String>]
[-Credential <PSCredential>]
[<CommonParameters>]
InputObject
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.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Credential
Specifies the credentials when connecting to a remote computer.
Parameter properties
| Type: | PSCredential |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-InputObject
Accepts an iSCSI virtual disk object from the input pipeline.
Parameter properties
| Type: | IscsiVirtualDisk |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
InputObject
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | 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.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | DevicePath |
Parameter sets
DevicePath
| Position: | 0 |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.