Skip to content

Install Citrix VDA #66

@asktechsupport

Description

@asktechsupport
#--------------------AUTOMATED VDA INSTALLS POWERSHELL TOOLKIT v1-------------------#

<#
.Synopsis
    Automated (silent) Citrix VDA Installs

.DESCRIPTION
    Install Citrix VDA's on one or more targets

.GUIDANCE
[*] The AutomatedInstalls folder needs to be present on the target machines, not the DC's
[*] The experience is best running as an Administrator from a Domain Controller
[*] Script also accounts for the Print Spooler CVE and checks to ensure Print Spooler is enabled as the VDA will NOT install without this enabled

.NOTE
   Author help@asktechsupport.co.uk
   
.SOURCE
   
#>

#Perform VDA Installs on these servers
$InstallVDAonTargets = "server01"
$CheckSpoolerbeforeinstall = "C:\Citrix\VDAPreInstallChecks\Get-SpoolerStatus_$ReportDate.htm"
$workdir1 = "C:\Citrix\Cloud VDA\"
$workdir2 = "C:\Citrix\VDAPreInstallChecks\"
$InstallvdaforSharedDesktops = "Start-Process "C:\Citrix\Cloud VDA\VDAServerSetup.exe" -ArgumentList '/virtualmachine /components vda,plugins /includeadditional "Citrix Profile Management,Citrix Profile Management WMI Plug-in" /enable_hdx_ports /enable_hdx_udp_ports /enable_real_time_transport /enable_remote_assistance /optimize /controllers "con01.fqdn.co.uk con02.fqdn.co.uk" /Exclude "Citrix Telemetry Service" /disableexperiencemetrics /logpath "C:\Citrix\VDALogs\VDA_Install.log" /quiet' -Wait"
$InstallvdaforMCS = "Start-Process "C:\Citrix\Cloud VDA\VDAServerSetup.exe" -ArgumentList '/virtualmachine /components vda,plugins /includeadditional "Citrix Profile Management,Citrix Profile Management WMI Plug-in" /mastermcsimage /enable_hdx_ports /enable_hdx_udp_ports /enable_real_time_transport /enable_remote_assistance /optimize /controllers "con01.fqdn.co.uk con02.fqdn.co.uk" /Exclude "Citrix Telemetry Service" /disableexperiencemetrics /logpath "C:\Citrix\VDALogs\VDA_Install.log" /quiet' -Wait"

	# Check if work directory exists, and create it if not

  		If (Test-Path -Path $workdir -PathType Container)
  		{ Write-Host "$workdir1 already exists" -ForegroundColor Red}
  			ELSE
  		{ New-Item -Path $workdir1 -ItemType directory }

	# Check if work directory exists, and create it if not

  		If (Test-Path -Path $workdir -PathType Container)
  		{ Write-Host "workdir2 already exists" -ForegroundColor Red}
  			ELSE
  		{ New-Item -Path $workdir2 -ItemType directory }


#Show me that Print Spooler is enabled before installing
#
Invoke-Command -ComputerName $InstallVDAonTargets -ScriptBlock {(Set-Service -Name Spooler -StartupType Auto )}
Invoke-Command -ComputerName $InstallVDAonTargets -ScriptBlock {(Get-Service -DisplayName Print Spooler | Start-Service )}
 
Invoke-Command -ComputerName $InstallVDAonTargets -ScriptBlock {(
Get-Service -Name Spooler | Select -Property PSComputerName,Name,Status,StartType | Sort -Property PSComputerName
)} |

ConvertTo-Html |
Out-File $CheckSpoolerbeforeinstall
start $CheckSpoolerbeforeinstall

#
# To install from the DC's on Shared Desktops
#

Invoke-Command -ComputerName $InstallVDAonTargets -ScriptBlock { 
    $InstallvdaforSharedDesktops
}

#_______________________________________________End Script__________________________________________________________#

 #
# To install from the DC's on Images with session hosts

#
#Differences explained below
# An Extra option is selected /mastermcsimage

###---I HAVE AN EXTRA OPTION SELECTED TO CONFIGURE ME TO DEPLOY SESSION HOSTS
###---THAT OPTION IS: </mastermcsimage> (WITHOUT THE ARROWS)---###

	#Invoke-Command -ComputerName $InstallVDAonTargets -ScriptBlock { 
	 #	$InstallvdaforMCS
	#}

#_______________________________________________End Script__________________________________________________________#


#
# To remove (WORKING 12/09/2021)
	$RemoveVDAonTargets = "server01"
	#
	#Invoke-Command -ComputerName $RemoveVDAonTargets -ScriptBlock { 
	 #   Start-Process "C:\Citrix\Cloud VDA\VDAServerSetup.exe" -ArgumentList '/removeall /quiet' -Wait
	#}

#_______________________________________________End Script__________________________________________________________#

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions