Gets the list of target ports.
Syntax
Get-EmcTargetPort [[-ID] <String>] [-BlockStorageSystem <IBlockStorageSystem>] [-PortType <String>] [-Silent] [<CommonParameters>]
Get-EmcTargetPort [[-ID] <String>] [-PortType <String>] [-Silent] [-Pool <LunStoragePool>] [<CommonParameters>]
Get-EmcTargetPort [[-ID] <String>] [-PortType <String>] [-Silent] [-Lun <Lun>] [<CommonParameters>]
Parameters
-Id <String>
Attributes: Optional, Position: 1
Specifies the target port ID. Wildcards are permitted. It is a positional parameter (position = 1).
-BlockStorageSystem <IBlockStorageSystem>
Attributes: Optional, Position: named
Specifies the ESI block storage system object, which can be added to ESI by using the Get-EmcStorageSystemCredential and Connect-EmcSystem cmdlets. You can get a storage system object by using the Get-EmcStorageSystem cmdlet.
-PortType <String>
Attributes: Optional, Position: named
Specifies the port type. The value can be All, FC, or iSCSI.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays errors.
-Pool <LunStoragePool>
Attributes: Optional, Position: named
Specifies the ESI storage pool object, which you can get from the ESI block storage system or by using the Get-EmcStoragePool cmdlet.
-Lun <Lun>
Attributes: Optional, Position: named
Specifies the ESI LUN object, which you can get by using the ESI storage system object or by using the Get-EmcLun cmdlet.
<CommonParameters>
This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. Type get-help about_commonparameters for more details.
Examples
-------------- Example 1 --------------
C:\PS>Get-EmcTargetPort | select Iqn, IP address
Iqn IP address
--- ---------
iqn.1992-05.com.emc:apm001120033400000-1-vnxe 10.5.223.115
iqn.1992-05.com.emc:apm001120033400000-1-vnxe 10.5.223.116
This example gets the IQN and IP address information of the target ports on all registered storage systems.
-------------- Example 2 --------------
C:\PS>$lun = Get-EmcLun testlun
C:\PS>Get-EmcTargetPort -Lun $lun
Iqn : iqn.1992-05.com.emc:apm001120033400000-1-vnxe
IP address : 10.5.223.115
Port : 3260
InitiatorAuthentication : False
StorageSystemGlobalId : ae5107a4-0e17-4a3b-86c7-5cf84eed4e0e
ServiceNodeId : iscsi_node_0
TargetPortId : if_0
LinkState : Up
Status : OK
OtherProperties : {}
Tag :
DefaultStringForOtherProperties : ()
Iqn : iqn.1992-05.com.emc:apm001120033400000-1-vnxe
IP address : 10.5.223.116
Port : 3260
InitiatorAuthentication : False
StorageSystemGlobalId : ae5107a4-0e17-4a3b-86c7-5cf84eed4e0e
ServiceNodeId : iscsi_node_0
TargetPortId : if_1
LinkState : Up
Status : OK
OtherProperties : {}
Tag :
DefaultStringForOtherProperties : () ]
This example gets the target ports that serve the data service for the specified LUN.
-------------- Example 3 --------------
C:\PS>$pool = Get-EmcStoragePool myPool
C:\PS> Get-EmcTargetPort -Pool $pool -PortType FC
This example gets the FC target ports that serve the data service for the specified pool.