The vdmadmin utility puts the VMware View administrator in command
Using the vdmadmin tool, a VMware View administrator can make virtual desktops dance through command-line wizardry.
Not all VMware View administrators are aware of the vdmadmin utility that comes with the View Connection Server. While many operations can be done in the Web-based administration console, there are some actions that can only be done with the command-line tool of the utility. These bonus tasks can be well worth the download, offering useful reporting, troubleshooting and administrative functions.
Where to find vdmadmin
The vdmadmin executable is available on each connection server where you installed View, typically in the "C:\Program Files\VMware\VMware View\Server\tools\bin" folder.
If you run vdmadmin without any parameters, it displays a list of available categories. For each category you can get detailed information with the "-help" parameter. For example, the command-line parameter "vdmadmin.exe -A -help" will display information on how to collect agent information from virtual desktops.
Tasks only available from vdmadmin command line
There are a few commands that can only be performed with vdmadmin, such as removing a connection server that no longer exists in your environment. When removing a server, you normally uninstall the software from within Windows. But when the server no longer exists and you want to remove it, you cannot go into the graphical console and just click delete. Why not? Well, because there is no delete button. Run the utility from the command line with these parameters "vdmadmin.exe -S -s <servername> -r" to delete the server.
Other VMware View administrator tasks that can only be performed with vdmadmin are whitelisting or blacklisting Active Directory domains that should or should not be used for searching for users, assigning users to desktops and creating a kiosk user for unattended logins. Many of these tasks are described in the VMware Horizon View Administration guide, available on the VMware documentation website.
Useful reporting and troubleshooting tasks
Besides administration, there are also troubleshooting tasks where the vdmadmin tool is useful. For example, it can extract the configuration and log files from a running View Agent. When you want to investigate a virtual desktop, you could access that machine from the virtual machine console or remote control the user's desktop. But it is easier to extract all you need to know without connecting to the desktop. You can collect a log file bundle from the running desktop that contains log files, as the name implies, but also the entire configuration of the machine, such as the Windows environment variables, hosts file, output of the ipconfig command> and much more.
To extract the bundle, use the "vdmadmin -A -b [email protected] * -d <pool name> -m <machine name> -getDCT -outfile c:\bundle.zip" command.
This will connect to a machine in a pool, connect as user administrator and, because of the wild card after the username, you will be prompted for a password. It will take a few minutes to collect all the data. You can unzip the bundle and find all available information from that desktop in the extracted folder structure. (See Figure 1.) If you use this command several times, use a unique file name. If a file with the same name exists, it will not be overwritten.
The tool can also list information about desktops in your environment. While this can be done from the Web console, the command-line tool gives more information. To see all desktops within a pool with its vCenter path, assigned user, creation date and the current status, use the "vdmadmin -M -d <pool name>" command. (See Figure 2.)
For this and many other commands, you can list the information in a native list format. It is also possible to create the list in a comma-separated value format using the "-csv" flag or in XML format with the "-xml" parameter.