Setting Up for Linux Desktops

Table Of Contents
Script Input
This script reads one input file, which is described in Input File for the Sample PowerCLI Scripts to Deploy
Linux Desktops. This script also interactively asks for the following information:
n
IP address of the vCenter Server
n
Administrator login name for the vCenter Server
n
Administrator password for the vCenter Server
n
Administrator login name for the ESXi host
n
Administrator password for the ESXi host
n
User login name for the Linux VM
n
User password for the Linux VM
n
Login name of an AD user that is authorized to join machines to the domain
n
Password of the authorized AD user
Script Content
<#
.SYNOPSIS
run command "sudo /usr/bin/net ads join"
.DESCRIPTION
The tool is to run the command "sudo /usr/bin/net ads join" to join Linux to AD
.NOTES
#>
#------------------------- Functions -------------------------
function GetInput
{
Param($prompt, $IsPassword = $false)
$prompt = $prompt + ": "
Write-Host $prompt -NoNewLine
[Console]::ForegroundColor = "Blue"
if ($IsPassword)
{
$input = Read-Host -AsSecureString
$input =
[Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBST
R($input))
}
else
{
$input = Read-Host
}
[Console]::ResetColor()
Setting Up Horizon 7 for Linux Desktops
VMware, Inc. 84