As of version 4.6 VMware View came with some PowerCLI Cmdlets, I wrote a post about these recently after they were released explaining why this was both a good and a bad thing.
I have seen a couple of posts since then using View PowerCLI :
- Gabe’s script to automatically retrieve set the Dynamically assigned IP address of the PCOIP connection – Highly recommended for anyone messing with view in their home lab or using it without a static internet IP address.
- Managing VMware View 4.5 virtual desktops with PowerCLI
Myself, I never really had a reason to use them that much, I have been busy since they came out and have always been meaning to have a more thorough look at what could be done.
My next post will go into some more detail on the use case but for now I wanted to talk about using these cmdlets from another machine. Normally with PowerCLI we can connect to the vCenter server using any machine with PowerCLI installed on it whether that be our workstation, an admin server or the vCenter server itself, unfortunately we are unable to do that with the View cmdlets as they stand but PowerShell can help us with this.
One of the features built into Windows PowerShell V2 is called remoting, to find out more information about this feature use the get-help cmdlet in PowerShell as follows: Get-Help About_Remoting.
As explained from the PowerShell help:
You can run remote commands on a single computer or on multiple computers by using a temporary or persistent connection. You can also start an interactive session with a single remote computer.
Also available and very helpful with setting up the correct PowerShell remoting configuration is the following two free guides:
This means that with the correct configuration we can connect to the View server from any machine with PowerShell V2 installed and import the View cmdlets and run them as if we are on the machine, lets see how…
Connecting to the View Server
Use the following video to connect to the View server once remoting is enabled on it: