Get-IscsiVirtualDisk

Get-IscsiVirtualDisk

Obtains the iSCSI virtual disks and their associated properties.

Syntax

Parameter Set: Device
Get-IscsiVirtualDisk [[-Path] <String> ] [-ClusterGroupName <String> ] [-ComputerName <String> ] [-Credential <PSCredential> ] [ <CommonParameters>]

Parameter Set: Initiator
Get-IscsiVirtualDisk [-ClusterGroupName <String> ] [-ComputerName <String> ] [-Credential <PSCredential> ] [-InitiatorId <InitiatorId> ] [ <CommonParameters>]

Parameter Set: Target
Get-IscsiVirtualDisk [-ClusterGroupName <String> ] [-ComputerName <String> ] [-Credential <PSCredential> ] [-TargetName <String> ] [ <CommonParameters>]




Detailed Description

The Get-IscsiVirtualDisk cmdlet obtains the iSCSI virtual disks and their associated properties.

Parameters

-ClusterGroupName<String>

Specifies the name of the resource group or network in the resource group on which this cmdlet runs.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerName<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies the credentials when connecting to a remote computer.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InitiatorId<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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Path<String>

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.


Aliases

DevicePath

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-TargetName<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Iscsi.Target.Commands.IscsiVirtualDisk

Examples

Example 1: Get all virtual disks on the local server

This example gets all of the virtual disks on the local server.


PS C:\> Get-IscsiVirtualDisk

Example 2: Get virtual disk by using a path

This example gets the virtual disk object that has the path E:\temp\test.vhdx on the local server.


PS C:\> Get-IscsiVirtualDisk –Path "E:\temp\test.vhdx"

Example 3: Get a virtual disk on a remote server

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.


PS C:\> Get-IscsiVirtualDisk –Path "E:\temp\test.vhdx" -ComputerName "fscluster.contoso.com" -ClusterGroupName "target1Group"

Example 4: Get virtual disks associated with a target

This example gets all of the virtual disks that are associated with the target named TargetOne on the local server.


PS C:\> Get-IscsiVirtualDisk -TargetName "TargetOne"

Example 5: Get virtual disks by an initial

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.


PS C:\> Get-IscsiVirtualDisk -InitiatorId "IpAddress:10.10.1.1"

Related topics

Community Additions

ADD
Show: