Automation

 View Only
  • 1.  get vcenter infra quick stats using powercli

    Posted Aug 07, 2019 06:34 PM

    im looking to connect to vcenter using powercli and get the following quick stats

    eneral Information
    General details on the infrastructure
    Number of Hosts:#
    Number of VMs:#
    Number of Templates:#
    Number of Clusters:#
    Number of Datastores:#
    Number of Datastore Clusters:19

    can anyone help me with the syntax?



  • 2.  RE: get vcenter infra quick stats using powercli
    Best Answer

    Posted Aug 07, 2019 07:19 PM

    Like this?

    [pscustomobject]@{

       'Number of Hosts' = (Get-VMHost).Count

       'Number of VMs' = (Get-VM).Count

       'Number of Templates' = (Get-Template).Count

       'Number of Clusters' = (Get-Cluster).Count

       'Number of Datastores' = (Get-Datastore).Count

       'Number of Datastore Clusters' = (Get-DatastoreCluster).Count

    }

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

    Was it helpful? Let us know by completing this short survey here.



  • 3.  RE: get vcenter infra quick stats using powercli

    Posted Aug 07, 2019 07:57 PM

    thanks i will try it out



  • 4.  RE: get vcenter infra quick stats using powercli

    Posted Aug 08, 2019 08:26 AM

    Thank you, it gives a quick over all stats, will be handy at times.