Get-IscsiServerTarget
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Get-IscsiServerTarget
Obtains iSCSI targets and their associated properties.
Syntax
Parameter Set: Target
Get-IscsiServerTarget [[-TargetName] <String> ] [-ClusterGroupName <String> ] [-ComputerName <String> ] [ <CommonParameters>]
Parameter Set: Device
Get-IscsiServerTarget [-ClusterGroupName <String> ] [-ComputerName <String> ] [-Path <String> ] [ <CommonParameters>]
Parameter Set: Initiator
Get-IscsiServerTarget [-ClusterGroupName <String> ] [-ComputerName <String> ] [-InitiatorId <InitiatorId> ] [ <CommonParameters>]
Detailed Description
The Get-IscsiServerTarget cmdlet obtains iSCSI targets and their associated properties from the local server or specified computer.
Parameters
-ClusterGroupName<String>
Specifies the name of the resource group or network within the resource group on which this cmdlet should be run.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
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 |
-InitiatorId<InitiatorId>
Specifies the iSCSI initiator identifiers (IDs) to which the iSCSI target is assigned.
Use this parameter to filter out the iSCSI Server Target object which can be accessed by the given iSCSI initiator.
The format of this parameter is IdType:Value
.
The acceptable values for this parameter are:DNSName, IPAddress, IPv6Address, IQN, 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.
Use this parameter to filter the iSCSI Target object that is associated with the virtual disks.
Aliases |
none |
Required? |
false |
Position? |
named |
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 Target object.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- Microsoft.Iscsi.Target.Commands.IscsiServerTarget
Outputs
The output type is the type of the objects that the cmdlet emits.
- Microsoft.Iscsi.Target.Commands.IscsiServerTarget
Examples
EXAMPLE 1
This example gets the iSCSI targets on the local server.
PS C:\> Get-IscsiServerTarget
EXAMPLE 2
This example gets all of the iSCSI targets on the remote server named fs1.contoso.com.
PS C:\> Get-IscsiServerTarget -ComputerName "fs1.contoso.com"
EXAMPLE 3
This example gets all of the iSCSI targets in the resource group named target1group on the cluster named fscluster.contoso.com.
PS C:\> Get-IscsiServerTarget -ComputerName "fscluster.contoso.com" -ClusterGroupName "target1group"
EXAMPLE 4
This example gets the iSCSI target associated with the VHD with the path "E:\temp\test.vhd"
PS C:\> Get-IscsiServerTarget -Path "E:\temp\test.vhd"
EXAMPLE 5
This example gets all of the iSCSI targets that have been assigned to the initiator with type DNSName, and value TargetSvr.contoso.com.
PS C:\> Get-IscsiServerTarget -InitiatorId "DNSName:TargetSvr.Contoso.com"