When it comes to virtual desktop infrastructure, administrators have a lot of choices. You may have wondered about the differences between VDI software options, remote display protocols or all the licenses out there. In this series, we tackle some of the biggest head-scratchers facing VDI admins to help you get things straight.
One thing most administrators have some experience with is automation. Automation tools and scripting languages can help perform bulk tasks or set tasks to happen on a regular basis. But did you know there are lots of opportunities for automation in a virtual desktop environment? With the answers to these frequently asked questions, learn how to use PowerShell for VDI automation and discover other ways to automate actions such as virtual desktop provisioning, monitoring and image management.
How can I get started with VDI automation?
Having a base, or "golden," image for virtual desktops is the first step toward automation. Automation tools and features in desktop virtualization platforms can help you automate the creation and management of those virtual desktop images. They offer the ability to deploy an image to multiple VDI servers, synchronize user data, and patch and update images.
What tasks can I automate in a virtual desktop environment?
One simple task that you can automate is desktop updates. Using the base virtual desktop image, you can set an update or patch to occur across multiple desktops in a group or pool. You can also automate hypervisor tasks such as finding a virtualization host, or create virtual machines for your infrastructure -- whether it's with VMware vSphere or Microsoft Remote Desktop Services. Monitoring your virtual desktop environment is another great place for automation; you can run scripts for reporting and checking event logs.
Where can I find scripts to help automate VDI?
Microsoft has a lot of documentation available for its PowerShell scripting language, and you can also find a repository of resources for other scripting. Check out this PowerShell FAQ for information on cmdlets for XenApp and using PowerCLI for VMware View automation.
Of course, one of the best parts of being an IT administrator is that there are plenty of online forums and websites from other admins willing to share cmdlets that they've come up with and tested. One example is VirtualizationAdmin.com, which offers tutorials about everything from XenApp to Remote Desktop Services, including automation tips for numerous virtual desktop platforms.
What are some useful scripts for automating VDI tasks?
The library of Hyper-V cmdlets for Windows Server 2012 includes many that would be useful for VDI administrators. To manage the virtual machines in your underlying infrastructure, you can use cmdlets like Import-VM and Checkpoint-VM to import virtual machines or take snapshots of them. There are also ways to manage virtual hard disks (VHDs) for those machines: You can merge VHDs, mount them and move the entire virtual machine storage with PowerShell. Get a taste of what else is possible with this sampler of Windows PowerShell scripts.
Can I use automation to create virtual desktop pools?
Yes, creating virtual desktop pools with similarly configured individual desktops is a perfect task for automation. In VMware View, virtual machine templates help you create a base desktop, and a provisioning wizard lets you set naming and configurations for the desktops in the pool. You can choose to deploy nonpersistent or persistent desktops with this method.