Dear Friends
im have some Datastore Paths that the name is different than the name of the virtual machine´s
Then, how can do a command to check what is the virtual machine of this data store path ????
Thanks
Almir Fiorio
Can you try like below and let me know it matches your requirement.
$vms = get-vm
$info = @()
foreach($vm in $vms){
$info += Get-HardDisk $vm | select @{N='Name';E={$vm.Name}},FileName
}
$info | Export-csv c:\VMpath.csv -notypeinformation
Are these VMs still registered, or are these orphaned VMs ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Dear LucD
all VM are in vcenter and are registered and have Vmotion
Thanks
Almir
Sivaramsharmar escreveu:
Can you try like below and let me know it matches your requirement.
$vms = get-vm
$info = @()
foreach($vm in $vms){
$info += Get-HardDisk $vm | select @{N='Name';E={$vm.Name}},FileName
}
$info | Export-csv c:\VMpath.csv -notypeinformation
Great
but I want to Otherwise,
im need to search for the datastore name and inform if have any vm attached to this datastore?
Thanks
Almir