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:

Share this:

Like this:

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 http://blogs.vmware.com/vipowershell and has a personal blog at http://virtu-al.net. You can follow Alan on twitter as @alanrenouf.

You may also like...

3 Responses

## 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