Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 176483

cluster.count = $null - Why is this happening ?

$
0
0

I am attempting to capture the number of clusters on a VC and when I run the script on a VC that has only one cluster I am seeing the object set to $null.  If I run the code on a VC that has more than 1 cluster $ccount is set to the correct value.  I am not sure why this is happening and I am hoping someone can help me out.  So here is what I am doing

 

 

$clus=Get-Cluster

$ccount=$clus.count

 

 

 

 

PowerCLI Version

----------------

   VMware vSphere PowerCLI 5.1 Release 2 build 1012425

---------------

Snapin Versions

---------------

   VMWare AutoDeploy PowerCLI Component 5.1 build 768137

   VMWare ImageBuilder PowerCLI Component 5.1 build 768137

   VMware vCloud Director PowerCLI Component 5.1 build 1012427

   VMware License PowerCLI Component 5.1 build 669840

   VMware VDS PowerCLI Component 5.1 build 1012428

   VMware vSphere PowerCLI Component 5.1 build 1012428


Viewing all articles
Browse latest Browse all 176483

Trending Articles



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