«

»

Feb 10 2012

Unofficial Advanced VMware View Powershell Cmdlets

What if you could issue any function or feature available in VMware View GUI via PowerCLI cmdlets? What if you could call those cmdlets from a remote server?

Clint Kitson, Chris Horn and I worked together on a project to deliver the next-gen lab environment, and VMware View has been the demand management focal point.  The core concept that we are working to deliver is essentially “desktop as a service” for lab environments.

The idea is that a pool of semi pre-configured VMs that make up for any given EMC application are packaged together in a vAPP container. Each vAPP has a domain controller, vCenter Server, ESXi servers and other required VMs to make the lab work.  This vAPP container is then used as master image to create multiple running copies of that vAPP. Sounds very similar to vCloud Director, No?! Yes, but what we are trying to achieve is beyond today’s VCD capabilities.

Additionally, we wanted to provide users with an easy and seamless way to access each individual Lab (vAPP) without having to jump between console screens. For this reason we included a Windows 7 VM in each vAPP and scripted (PS) the sysprep process and the inclusion of that VM into VMware View desktop pools. I hinted that in my post  VMware View Remote Agent Install using PowerCLI.

Great! Now we had a VMware View environment providing access via PCoIP to desktop pools that correlate to multiple vAPPs (labs).

However, infrastructure to support 3,000 of those labs is expensive and the least amount of VMs we have in a vAPP will help to reduce cost. That’s when my research on How to Access Windows 2K8 Server via PCoIP with VMware View came handy. We are now working to convert the vCenter VM into the access point for the vAPP and eliminate the requirement for the Windows 7 desktop. Furthermore, we will also be able to give users the same look and feel of a Windows 7 desktop (How to give Win Server 2K8 R2 a Win7 Look & Feel in VMware View).

We were working closely with the methods and cmdlets available in VMware View, but some key features were missing in our opinion. In the meantime Clint also created the VMware View Pool Membership Management using PowerCLI.

That’s when Clint had a breakthrough. Why not to use the Adobe AMF (action message format) messaging used by the GUI to talk directly to connection brokers. So, he developed a very cool scalable method for anyone to leverage AMF remoting with Powershell.

With the ability to call new cmdlets remotely the first step was to re-create the existing VMware View PS cmdlets an than expand. The cmdlets available today are:

 

Connect-ViewConnServer
Get-AccessSettings
Get-Administrators
Get-Desktops
Get-EventConfiguration
Get-Folders
Get-ImageRepositoryDetails
Get-LocalSessions
Get-PersistentDisks
Get-Policies
Get-Pools
Get-RemoteSessions
Get-Roles
Get-SecurityServers
Get-Servers
Get-ThinAppRepositories
Get-ThinApps
Get-TransferServers
Get-UsageList
Get-UsersGroups
Get-VDMServers
Get-ViewDashboard
Get-ViewGlobalSettings
Get-ViewStatus

 

image

 

You can download the script module here, however I strongly recommend you to go over to Clint’s blog and read his article. His article contains details on how to intercept SSL calls using WireShark and how he is planning to further extended VMware View cmdlets. Read at http://velemental.com/2012/02/04/unofficial-advanced-vmware-view-powershell-cmdlets/

 

This article was first published by Andre Leibovici (@andreleibovici) at myvirtualcloud.net. Visit myvirtualcloud.net for more articles about Virtualization, VDI and End User Computing.

Leave a Reply