Skip to content

Instantly share code, notes, and snippets.

@scottd3v
Created April 4, 2019 19:25
Show Gist options
  • Select an option

  • Save scottd3v/9a676b5a04b7910ccbc220bc9ecaea5c to your computer and use it in GitHub Desktop.

Select an option

Save scottd3v/9a676b5a04b7910ccbc220bc9ecaea5c to your computer and use it in GitHub Desktop.
$CONNECT_KEY="your-JumpCloud-Connect-Key-here"
$AGENT_INSTALLER_URL="https://s3.amazonaws.com/jumpcloud-windows-agent/production/JumpCloudInstaller.exe"
$AGENT_INSTALLER_PATH="$env:TEMP\JumpCloudInstaller.exe"
Function DownloadAgentInstaller() {
(New-Object System.Net.WebClient).DownloadFile("${AGENT_INSTALLER_URL}", "${AGENT_INSTALLER_PATH}")
}
Function InstallAgent() {
$params = ("${AGENT_INSTALLER_PATH}", "-k ${CONNECT_KEY}", "/VERYSILENT", "/NORESTART", "/SUPRESSMSGBOXES", "/NOCLOSEAPPLICATIONS", "/NORESTARTAPPLICATIONS", "/LOG=$env:TEMP\jcUpdate.log")
Invoke-Expression "$params"
}
DownloadAgentInstaller
InstallAgent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment