Gathering simple pool information from VMware View

Recently I was asked if we could list some basic information from VMware View using the cmdlets which come installed on the View Administrator server, the request was specifically a list of VMs and the pool they were in, this was easily achieved with the Get-DesktopVM cmdlet as below:

Get-DesktopVM | Select Name, Pool_id | Sort Pool_id

Secondly they were after a list of pools and the number of VMs which were part of these pools, these can be found using a calculated property and a combination of the Get-Pool and Get-DesktopVM cmdlets as below:

Get-Pool | Select Pool_id, @{Name="NumVM";Expression={($_ | Get-DesktopVM).Count}}


Alan Renouf has a role of Automation Frameworks Product Manager at VMware responsible for providing the architects and operators of the cloud infrastructure with the toolkits/frameworks and command-line interfaces they require to build a fully automated software-defined datacenter. Alan is a frequent blogger at and has a personal blog at You can follow Alan on twitter as @alanrenouf.

You may also like...

3 Responses

  1. Hunter says:

    I used this thanks to VMware Communities:

    ## get all pools, and for each, get the count of how many of their VMs are powered on
    ) | ?{$_.PowerState -eq “poweredOn”} | Measure-Object).Count} else {“no desktops found”}
    ## create new object with some info for PoolID and NumPoweredOnVMs
    New-Object -Type PSObject -Property @{
    PoolID = $strPoolID
    NumPoweredOnVMs = $intNumPoweredOnVMs
    } ## end new-object
    } ## end foreach-object

    } | Select PoolID, NumPoweredOnVMs

  2. aj6681 says:

    Another way to grab count of vm’s in a pool… only drawback is you will get a $null pool_id for any full server vm’s and replica’s

    Get-DesktopVM | group Pool_ID | Select name, count

  1. March 24, 2013

    […] Alan Renouf приводит скрипт по простенькой инвентаризации пулов VMware View. […]

Leave a Reply

%d bloggers like this: