Created
December 27, 2017 14:11
-
-
Save PSingletary/cc42941f4b1da210c9dff0f946db7955 to your computer and use it in GitHub Desktop.
Downloads and installs Citrix Receiver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Downloads and installs Citrix Receiver. | |
Intended to run via Intune. | |
#> | |
# If Receiver is already installed, skip download and install | |
If (!(Get-WmiObject -Class Win32_Product | Where-Object Name -Like "Citrix Receiver*")) { | |
# Cirix Receiver download source | |
$Url = "https://downloadplugins.citrix.com/Windows/CitrixReceiver.exe" | |
$Target = "$env:SystemRoot\Temp\CitrixReceiver.exe" | |
# Delete the target if it exists, so that we don't have issues | |
If (Test-Path $Target) { Remove-Item -Path $Target -Force -ErrorAction SilentlyContinue } | |
# Download Citrix Receiver locally | |
Start-BitsTransfer -Source $Url -Destination $Target | |
# Install Citrix Receiver | |
If (Test-Path $Target) { Start-Process -FilePath $Target -ArgumentList "/AutoUpdateCheck=auto /AutoUpdateStream=Current /DeferUpdateCount=5 /AURolloutPriority=Medium /NoReboot /Silent EnableCEIP=False" -Wait } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment