Virtu-Al.Net

Virtually everything is poshable

Rescan all hosts for new storage

More of a note for myself really but others may find this useful, to rescan all the hosts (rather than clicking Rescan in the GUI) you can run the following PowerShell command:

For a Specific Cluster:

get-cluster -name “MY CLUSTER” | get-vmhost | Get-VMHostStorage -RescanAllHBA

All Hosts in VC:

get-vmhost | Get-VMHostStorage -RescanAllHBA

3 Responses to “Rescan all hosts for new storage”

  • Rob Preston says:

    Nice, just used it. Works a treat and will save loads of time.

    Keep ‘em coming.

  • Virtu-Al says:

    anything else you want, just let me know !

  • Kevin says:

    Thanks for the tip, although this makes it slightly easier, it still takes 5 minutes per server to re-scan and since this is a synchronous command, with 10 ESX hosts, this takes 1 hour to run.

    Any idea of a asynchronous way to kickoff a rescan for each host simultaneously?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>