Setting Up for Linux Desktops

Table Of Contents
"-----------------------------------------------------"
$guestUser = GetInput -prompt 'Your VM guest OS user name' -IsPassword $false
$guestPassword = GetInput -prompt 'Your VM guest OS user password' -IsPassword $true
"-----------------------------------------------------"
$agentInstaller = GetInput -prompt 'Type the Horizon Agent tar ball path. Please take care the
installer arch' -IsPassword $false
"-----------------------------------------------------"
$brokerAddress = GetInput -prompt 'Type the View Connection Server address' -IsPassword $false
$brokerAdminName = GetInput -prompt 'Type the View Connection Server Admin user name' -
IsPassword $false
"`nPlease type the View Connection Server Admin user password."
"Plase note that special character in password may not work with the script"
$brokerAdminPassword = GetInput -prompt 'Your broker admin password' -AsSecureString -
IsPassword $true
$domainName = GetInput -prompt 'Type the View Connection Server Admin user domain name' -
IsPassword $false
$installSmartcard = GetInput -prompt 'Install the Smartcard redirection feature ("yes" or "no")'
-IsPassword $false
if (($installSmartcard -ne "yes") -AND $installSmartcard -ne "no")
{
write-host -ForeGroundColor Red "You need select 'yes' or 'no'(case sensitive)"
exit
}
$kdc = GetInput -prompt 'AD address for Kerberos authentication to register. Please type Enter
to skip for MD5-Digest' -IsPassword $false
"-----------------------------------------------------"
#$csvFile = Read-Host 'Csv File '
$csvFile = '.\CloneVMs.csv'
#check if file exists
if (!(Test-Path $agentInstaller))
{
write-host -ForeGroundColor Red "installer File not found"
exit
}
#check if file exists
if (!(Test-Path $csvFile))
{
write-host -ForeGroundColor Red "CSV File not found"
exit
}
#------------------------- Functions -------------------------
function GetSourceInstallerMD5()
{
$agentInstallerPath = Convert-Path $agentInstaller;
$md5 = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider;
$md5HashWithFormat =
[System.BitConverter]::ToString($md5.ComputeHash([System.IO.File]::ReadAllBytes($agentInstallerPa
th)));
$md5Hash = ($md5HashWithFormat.replace("-","")).ToLower();
return $md5Hash;
}
#------------------------- Main -------------------------
#Get installer MD5Sum
Chapter 7 Bulk Deployment of Horizon 7 for Linux Desktops
VMware, Inc. 67