Setting Up for Linux Desktops

Table Of Contents
{
$input = Read-Host -AsSecureString
$input =
[Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStrin
gToBSTR($input))
}
else
{
$input = Read-Host
}
[Console]::ResetColor()
return $input
}
function Check_SSH_Client
{
Param($IsPlink, $IsPSCP)
if ($IsPlink)
{
if (Test-Path ".\plink.exe")
{
write-host -ForeGroundColor Yellow 'SSH client "plink.exe" found'
}
else
{
write-host -ForeGroundColor Red 'SSH client "plink.exe" not found, please download
from its official web site'
exit
}
}
if ($IsPSCP)
{
if (Test-Path ".\pscp.exe")
{
write-host -ForeGroundColor Yellow 'SSH client "pscp.exe" found'
}
else
{
write-host -ForeGroundColor Red 'SSH client "pscp.exe" not found, please download
from its official web site'
exit
}
}
}
function RunCmdViaSSH
{
Param($VM_Name, $User, $Password, $Cmd, $returnOutput = $false)
$VM= Get-VM $VM_Name
$IP = $VM.guest.IPAddress[0]
write-host "Run cmd on $VM_Name ($IP)"
if($returnOutput)
{
Chapter 8 Bulk Deployment of Horizon 7 for Manual Desktop Pools
VMware, Inc. 77