6.1.1

Table Of Contents
.NOTES
#>
#--------------------- Handle input ------------------
"-----------------------------------------------------"
$vcAddress = Read-Host 'Your vCenter address'
$vcAdmin = Read-Host 'Your vCenter admin user name'
$vcPassword = Read-Host 'Your vCenter admin user password' -AsSecureString
$vcPassword =
[Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStrin
gToBSTR($vcPassword))
"-----------------------------------------------------"
$hostAdmin = Read-Host 'Your ESXi host admin user name, such as root'
$hostPassword = Read-Host 'Your ESXi admin user password' -AsSecureString
$hostPassword =
[Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStrin
gToBSTR($hostPassword))
"-----------------------------------------------------"
$guestUser = Read-Host 'Your VM guest OS user name'
$guestPassword = Read-Host 'Your VM guest OS user password' -AsSecureString
$guestPassword =
[Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStrin
gToBSTR($guestPassword))
"-----------------------------------------------------"
$agentInstaller = Read-Host 'Type the View Agent tar ball path. Please take care the installer
arch'
#$csvFile = Read-Host 'Csv File '
$csvFile = '.\CloneVMs.csv'
"-----------------------------------------------------"
$brokerAddress = Read-Host 'Type the View Connection Server address'
$brokerAdminName = Read-Host 'Type the View Connection Server Admin user name'
"Please type the View Connection Server Admin user password."
"Plase note that special character in password may not work with the script"
$brokerAdminPassword = Read-Host 'Your broker admin password' -AsSecureString
$brokerAdminPassword =
[Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStrin
gToBSTR($brokerAdminPassword))
$domainName = Read-Host 'Type the View Connection Server Admin user domain name'
#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 --------------------------
Setting Up Horizon 6 for Linux Desktops
30 VMware, Inc.