VMWare View Kiosk Mode Admin Script

I had started to deploy some repurposed PC’s for thin clients using Windows ThinPC while we wait to place an order of Tera2 devices.  While after configuring a few Kiosk clients I thought I would save myself some time in the long run by creating a very simple batch file to issue the vdmadmin.exe commands in the correct format that fit my needs.  The following is a very crude script that will allow the Addition, Removal, and Listing of Kiosk clients for your connection server(s). Please keep in mind, the vdmadmin.exe command has a ton of other commands, and the purpose of this is to save some time for a few Admins and Helpdesk staff members to keep the syntax correct when running these commands. I plan to do a powershell version very shortly, but given the need to implement, this worked out fine.


@echo off
ECHO VMWare View Kiosk Admin
ECHO _______________________________
ECHO Please make a selection
ECHO (A)Add - (R)Remove - (L)List
ECHO _______________________________
set /p choice=Enter [A/R/L]: %=%

if %choice%==A GOTO :ADD
if %choice%==R goto :REMOVE
if %choice%==L goto :LIST
if %choice%==a GOTO :ADD
if %choice%==r goto :REMOVE
if %choice%==l goto :LIST
:ADD
ECHO Add Kiosk Devices
ECHO _______________________________
set /p hwadd=Enter Mac Address: %=%
set /p desc=Enter A Description: %=%
rem set /p group=Enter The Associated Group: %=%
ECHO _______________________________
ECHO Harware Address: %hwadd%
Echo Description: %desc%
rem ECHO Group: %group%
ECHO _______________________________
PAUSE
"\\172.16.30.172\C$\Program Files\VMware\VMware View\Server\tools\bin\vdmadmin.exe" -Q -clientauth -add -domain portlandschools.ad -clientid %hwadd% -group %group% -description %desc%
PAUSE

:REMOVE
set /p hwadd=Enter Mac Address: %=%
ECHO _______________________________
ECHO YOU ARE ABOUT TO REMOVE THIS CLIENT ID
ECHO Harware Address: %hwadd%
rem Echo Description: %desc%
rem ECHO Group: %group%
ECHO _______________________________
PAUSE
"C:\Program Files\VMware\VMware View\Server\tools\bin\vdmadmin.exe" -Q -clientauth -remove -domain portlandschools.ad -clientid %hwadd% -force
PAUSE

:LIST
"\\172.16.30.172\C$\Program Files\VMware\VMware View\Server\tools\bin\vdmadmin.exe" -Q -clientauth -list
PAUSE

Posted in View, Vmware