I got a list o f vms in vms.txt
I need to search these VMs in all 6 vcenters and find out which vcenter they are at.
is there quick way to do this with this?
get-content c:\vms.txt | % { get-vm $_ } | select Name
?
help please
thanks
Try like this
Get-Content c:\vms.txt | % { Get-VM $_ } | select Name,@{N='vCenter';E={$_.Uid.Split(“:”)[0].Split(“@”)[1]}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
Get-Content c:\vms.txt | % { Get-VM $_ } | select Name,@{N='vCenter';E={$_.Uid.Split(“:”)[0].Split(“@”)[1]}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc