Rescan HBA on all hosts in a Cluster – PowerCLI

When a new storage has been presented to all the hosts in a cluster, sometimes we may need to scan the HBA’s for the ESXi to see the storage. Most of the times when you rescan HBA on one ESXi, the others also see the storage but sometimes we may have to rescan HBA on all the hosts.

Visiting each host and clicking on the rescan is atime consuming task, hence we can make use of PowerCLI. Use the below command to Rescan HBA’s on all hosts in the Cluster at once.

Get-Cluster -Name “ClusterA” | Get-VMHost | Get-VMHostStorage -RescanAllHba


Hope this was informative. Thanks!