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

Re: Lessons on looping and global variables in functions

$
0
0

You can get the cluster name from a VirtualMachineImpl object by $_.VMHost.Parent.Name. So you don't need the hashtable.

 

In the Get-VMInfo function the "$i=1" and "$j=1" lines should be before the foreach startement and not inside the loop.


Viewing all articles
Browse latest Browse all 249166

Trending Articles



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