Get-IscsiVirtualDisk
Obtains the iSCSI virtual disks and their associated properties.
Syntax
Device (Default)
Get-IscsiVirtualDisk
[[-Path] <String>]
[-ClusterGroupName <String>]
[-ComputerName <String>]
[-Credential <PSCredential>]
[<CommonParameters>]
Target
Get-IscsiVirtualDisk
[-ClusterGroupName <String>]
[-TargetName <String>]
[-ComputerName <String>]
[-Credential <PSCredential>]
[<CommonParameters>]
Initiator
Get-IscsiVirtualDisk
[-ClusterGroupName <String>]
[-InitiatorId <InitiatorId>]
[-ComputerName <String>]
[-Credential <PSCredential>]
[<CommonParameters>]
Description
The Get-IscsiVirtualDisk cmdlet obtains the iSCSI virtual disks and their associated properties.
Examples
Example 1: Get all virtual disks on the local server
PS C:\> Get-IscsiVirtualDisk
This example gets all of the virtual disks on the local server.
Example 2: Get virtual disk by using a path
PS C:\> Get-IscsiVirtualDisk -Path "E:\temp\test.vhdx"
This example gets the virtual disk object that has the path E:\temp\test.vhdx on the local server.
Example 3: Get a virtual disk on a remote server
PS C:\> Get-IscsiVirtualDisk -Path "E:\temp\test.vhdx" -ComputerName "fscluster.contoso.com" -ClusterGroupName "target1Group"
This example gets the virtual disk object that has the path E:\temp\test.vhdx in the resource group named target1Group on cluster server named fscluster.contoso.com.
Example 4: Get virtual disks associated with a target
PS C:\> Get-IscsiVirtualDisk -TargetName "TargetOne"
This example gets all of the virtual disks that are associated with the target named TargetOne on the local server.
Example 5: Get virtual disks by an initial
PS C:\> Get-IscsiVirtualDisk -InitiatorId "IpAddress:10.10.1.1"
This example gets all of the virtual disks on the local server that are used by the initiator with IP address 10.10.1.1.
Parameters
-ClusterGroupName
Specifies the name of the resource group or network in the resource group on which this cmdlet runs.
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: | False |
Value from remaining arguments: | False |
-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 |
-InitiatorId
Specifies the iSCSI initiator identifiers (IDs) to which the iSCSI target is assigned. Use this parameter to filter out the iSCSI virtual disk object that can be accessed by the given iSCSI initiator. The format for this parameter is IdType:Value. The acceptable values for this parameter are: DNSName, IPAddress, IPv6Address, IQN, or MACAddress.
Parameter properties
Type: | InitiatorId |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Initiator
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Path
Specifies the path of the virtual hard disk (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
Device
Position: | 0 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-TargetName
Specifies the name of the iSCSI target. Use this parameter to filter out the iSCSI virtual disk objects that are assigned to the specified iSCSI target.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Target
Position: | Named |
Mandatory: | False |
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.