Created
April 4, 2019 19:25
-
-
Save scottd3v/9a676b5a04b7910ccbc220bc9ecaea5c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| $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