Hello I am trying to get the datastore name for a list of vms but not succeeding.
This just seems to pull all the datastores in the entire vcenter
$vmList = Get-Content E:\scripts\migrations\testgetDS-1.txt
foreach ($vm in $vmList) {Get-VM | Get-Datastore | Export-csv c:\Temp\testdsget.csv -NoTypeInformation}
Can anyone give me a little help? Thanks in advance