Hi ,
I wrote below script tom audit iscsi and I am getting the output as below.
$AuditISCSI = Invoke-Command -ComputerName $ComputerName { get-iscsisession } | FT PSComputerName, InitiatorPortalAddress, IsConnected -autosize
Output:
PSComputerName InitiatorPortalAddress IsConnected
-------------- ---------------------- -----------
slcqc038 10.214.89.117 True
Is there any ways so that I will get the output in this format
InitiatorPortalAddress :10.214.89.117
IsConnected:True