VMware Cloud Community
Gsanty
Contributor
Contributor

Need powercli script to get IQN targets of all ESXi servers in the cluster

Can anyone help me with a script to get the IQN targets of storage from all ESXi servers in the cluster
0 Kudos
2 Replies
lukearntz
Contributor
Contributor

We don't have any iSCSI hosts so I can't test this, but I can get all kinds of fibre channel info starting with this command:

Get-VMHost | Get-VMHostHba

I found this page online that may help you with more detailed iSCSI info. It's a bit dated but should help.

Edit: here's a better starting point.

Get-Cluster -name Clustername | Get-VMHost | Get-VMHostHba -type iscsi | Format-List

maksim-K
Contributor
Contributor

Get-VMhost | Get-VMHostHba -Type IScsi | Select @{n="Cluster";e={$_.VMHost.parent.name}}, VMHost, IScsiName

0 Kudos