how find the datastore for a vm with the datacenter with the command powershell, get-vm, get-datastore, get -datacenter
thanks you for your help
Thread moved to the PowerCLI Community.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'm not sure, I understand your question fully.
To get the datastore(s) on which a VM is located, you cna do.
Get-VM -Name MyVM | Get-Datastore
To get all the VMs in a datastore and show the datastore(s) they are on
Get-Datacenter -Name MyDC | Get-VM |
Select Name,@{N="Datastore";E={[string]::Join(',',(Get-Datastore -VM $_ | %{$_.Name}))}}
Or did you mean something completely different ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Oh thanks you for this response