Edit

Share via


Get-InitiatorPort

Gets one or more host bus adapter (HBA) initiator ports.

Syntax

ByNodeAddress (Default)

Get-InitiatorPort
    [[-NodeAddress] <String[]>]
    [-ConnectionType <ConnectionType[]>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByObjectId

Get-InitiatorPort
    [-ObjectId <String[]>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByInstanceName

Get-InitiatorPort
    [-InstanceName <String[]>]
    [-ConnectionType <ConnectionType[]>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByVirtualDisk

Get-InitiatorPort
    [-VirtualDisk <CimInstance>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByiSCSISession

Get-InitiatorPort
    [-iSCSISession <CimInstance>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByiSCSIConnection

Get-InitiatorPort
    [-iSCSIConnection <CimInstance>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByiSCSITarget

Get-InitiatorPort
    [-iSCSITarget <CimInstance>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

Description

The Get-InitiatorPort cmdlet gets and displays host bus adapter (HBA) initiator ports, such as SAS, FibreChannel, and iSCSI ports. Typically used either for connection to an iSCSI target in the case of iSCSI, or for in the management of masking sets in the case of FibreChannel.

Examples

Example 1: Get all initiator ports

PS C:\>Get-InitiatorPort
InstanceName                  NodeAddress                   PortAddress                   ConnectionType
------------                  -----------                   -----------                   --------------
ROOT\ISCSIPRT\0000_0          iqn.1991-05.com.contoso:...   ISCSI ANY PORT                iSCSI

This example gets all available initiator ports.

Example 2: Get all initiator ports, and filter the display

PS C:\>Get-InitiatorPort | Select-Object -Property NodeAddress,ConnectionType | Format-Table -AutoSize
NodeAddress                                                    ConnectionType
-----------                                                    --------------
iqn.1991-05.com.microsoft:johnj99-pc2.contoso.com              iSCSI

This example gets all available initiator ports. selects only the NodeAddress and ConnectionType properties, and then displays this information.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

Parameter properties

Type:SwitchParameter
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

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConnectionType

Specifies the type of the connection. Acceptable values are: Other, FibreChannel, iSCSI, and SAS.

To specify a custom connection type, specify the Other value and specify a non-NULL value for the OtherConnectionTypeDescription property.

Parameter properties

Type:

ConnectionType[]

Default value:None
Accepted values:Other, FibreChannel, iSCSI, SAS
Supports wildcards:False
DontShow:False

Parameter sets

ByNodeAddress
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByInstanceName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-InstanceName

Specifies the instance name of the initiator.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByInstanceName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-iSCSIConnection

Specifies the iSCSIConnection object for which you want to get the initiator port. Enter an iSCSIConnection CIM object, which is exposed by the Get-IscsiConnection cmdlet.

Parameter properties

Type:CimInstance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByiSCSIConnection
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-iSCSISession

Specifies the iSCSISession object for which you want to get the initiator port. Enter an iSCSISession CIM object, which is exposed by the Get-IscsiSession cmdlet.

Parameter properties

Type:CimInstance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByiSCSISession
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-iSCSITarget

Specifies the iSCSITarget object for which you want to get the initiator port. Enter an iSCSITarget CIM object, which is exposed by the Get-IscsiTarget cmdlet.

Parameter properties

Type:CimInstance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByiSCSITarget
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-NodeAddress

Specifies the node address for the initiator.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByNodeAddress
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ObjectId

Specifies the ObjectID of the initiator.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Id

Parameter sets

ByObjectId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Parameter properties

Type:Int32
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

-VirtualDisk

Specifies the VirtualDisk object for which you want to get the initiator port. Enter a VirtualDisk CIM object, which is exposed by the Get-VirtualDisk cmdlet.

Parameter properties

Type:CimInstance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByVirtualDisk
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
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.

Inputs

CimInstance

You can pipe an iSCSIConnection object to the iSCSIConnection parameter.

CimInstance

You can pipe an iSCSISession object to the iSCSISession parameter.

CimInstance

You can pipe an IscsiTarget object to the IscsiTarget parameter.

CimInstance

You can pipe a VirtualDisk object to the VirtualDisk parameter.

Outputs

CimInstance

This cmdlet returns an object that represents the initiator port you specified.

Notes

  • When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all servers in the cluster).