QUICK COMMAND TO GET A SHARED DATASTORE

A new awesome script is coming here soon but until then – heres a quick powercli way to get a datastore which is shared by more than one host.

Below I am getting its MOID because for another purpose but you can easily replace it with Name or what ever that you’d like to grab.

Hope this helps!

1
$datastore_full_id = get-cluster $cluster_name | Get-Datastore | get-view | where {$_.Host.length -gt 1} | Select-Object -ExpandProperty MoRef | Out-String

Leave a Reply

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

Post Navigation