Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Hash Table difficulty

$
0
0

Hi I'm trying to create a table containing vm name and the datastorecluster they are contained within, no matter what I try I cant seem to create the table I can list the object as follows:-

 

$vmlist = Get-Content 'C:\vmlist\vm2.txt'

foreach ($vm in $vmlist){

get-vm $vm | select name

get-vm $vm | get-datastorecluster

}

But as soon as I try to create a hash table from the above it just doesn't work no matter which approach I take, can anyone help? oh and is there a wat to achieve the same with get-view as this is very slow.

 

Thanks


Viewing all articles
Browse latest Browse all 219257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>