Skip to content
PowerShell Commands

Get-InitiatorPort

Get-InitiatorPort [[-NodeAddress] <String[]>] [-CimSession <CimSession[]>] [-ConnectionType <ConnectionType[]>][-ThrottleLimit <Int32>] [<CommonParameters>]
Get-InitiatorPort [-CimSession <CimSession[]>] [-iSCSIConnection <CimInstance>] [-ThrottleLimit <Int32>][<CommonParameters>]
Get-InitiatorPort [-CimSession <CimSession[]>] [-iSCSITarget <CimInstance>] [-ThrottleLimit <Int32>][<CommonParameters>]
Get-InitiatorPort [-CimSession <CimSession[]>] [-iSCSISession <CimInstance>] [-ThrottleLimit <Int32>][<CommonParameters>]
Get-InitiatorPort [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-VirtualDisk <CimInstance>][<CommonParameters>]
Get-InitiatorPort [-CimSession <CimSession[]>] [-ConnectionType <ConnectionType[]>] [-InstanceName <String[]>][-ThrottleLimit <Int32>] [<CommonParameters>]
Get-InitiatorPort [-CimSession <CimSession[]>] [-ObjectId <String[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]

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.

Parameters

-CimSession [<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.

-ConnectionType [<ConnectionType[]>]

  • Accepts pipeline input ByPropertyName

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.

-InstanceName [<String[]>]

  • Accepts pipeline input ByPropertyName

Specifies the instance name of the initiator.

-NodeAddress [<String[]>]

  • Accepts pipeline input ByPropertyName

Specifies the node address for the initiator.

-ObjectId [<String[]>]

  • Accepts pipeline input ByPropertyName

Specifies the ObjectID of the initiator.

-ThrottleLimit [<Int32>]

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

-VirtualDisk [<CimInstance>]

  • Accepts pipeline input ByValue

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.

-iSCSIConnection [<CimInstance>]

  • Accepts pipeline input ByValue

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.

-iSCSISession [<CimInstance>]

  • Accepts pipeline input ByValue

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.

-iSCSITarget [<CimInstance>]

  • Accepts pipeline input ByValue

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.

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.

Inputs
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_IscsiConnection
http://msdn.microsoft.com/library/windows/desktop/hh968122.aspx You can pipe an iSCSIConnection object to the iSCSIConnection parameter. Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_IscsiSession http://msdn.microsoft.com/library/windows/desktop/hh968125.aspx You can pipe an iSCSISession object to the iSCSISession parameter. Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_IscsiTarget http://msdn.microsoft.com/library/windows/desktop/hh968132.aspx You can pipe an IscsiTarget object to the IscsiTarget parameter. Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk http://msdn.microsoft.com/library/windows/desktop/hh830584.aspx You can pipe a VirtualDisk object to the VirtualDisk parameter.
Outputs
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_InitiatorPort
http://msdn.microsoft.com/library/windows/desktop/hh830507.aspx This cmdlet returns an object that represents the initiator port you specified.
Examples
  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.

  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.

This work is licensed under a Creative Commons Attribution 4.0 International. It is attributed to Microsoft Corporation and can be found here.

PowerShell Commands