Hi,
A newbie question:
How can I find out which Datacenters are using the same Datastore.
The command I'am using is:
$datastore=Get-Datastore nameOrRegex
$datastore | %{if (($_.Datacenter | Measure | Select -ExpandProperty Count) -gt 1) {Write-Host $_.Name" is used by "$_.Datacenter}}
You will check for every datastore stored in your variable if they have more than one datacenter in their property Datacenter, if so it will print a sentence with the datastore and its datacenter.
We do not have datastore used by multiple datacenter here so i couldn't test properly 😕
Thanks for the fast reply. Much appreciated.
I've excuted the line, but the output is empty. I'll for more info in the meanwhile 🙂
Cheers
Are you sure you have datastore used by multiple datacenter ? If so get a datastore you're sure is used by multiple datacenter and check the datacenter property.
Thanks mate.
$datastore=Get-Datastore -Name 'Template'
$datastore | select name, datacenter
I need to figure out more, but this is a good start.
Thanks so much.
Cheers,
Roberto
There are 2 possibilities here afaik.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference