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

Re: Get clusters, display in pop box code issue

$
0
0

When there is only 1 cluster, the $v variable will not be an array and the Count property will not exist (provided you are not using PowerShell v3).

What you can do is change that line into

$v = @(get-cluster)

That way it will be an array, even with 1 cluster.

For no cluster ($v -eq $null) you will have to add some extra lines.


Viewing all articles
Browse latest Browse all 197835

Trending Articles



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