Looking for help building a script to install JumpCloud agent

Good evening. I have a Windows PowerShell Command that JumpCloud provides to install the jumpcloud agent. I need assistance to create a script for Xcitium to run this Ps command.

cd $env:temp | Invoke-Expression; Invoke-RestMethod -Method Get -URI https://raw.githubusercontent.com/TheJumpCloud/support/master/scripts/windows/InstallWindowsAgent.ps1 -OutFile InstallWindowsAgent.ps1 | Invoke-Expression; ./InstallWindowsAgent.ps1 -JumpCloudConnectKey “xxxxxxxxxxxxxxxxxxxxxxxxxxx”

Thanks in advance for all your help.

Hello @enrique.resendez ,

Thank you for your request. We have accepted your request and taken into our development queue. We will let you know when the script is ready to be used.

Best regards,
Ilgaz

Hi @enrique.resendez ,

Please try this script and provide your feedback
https://scripts.itarian.com/frontend/web/topic/script-to-install-jumpcloud-agent

Kind Regards,
PremJK

Thank you very much for the script. I am testing but getting error in parameter. What type of parameter should I configure under the script config in xcitium? I get 4 options like string, etc. than asking for the name and the final would be my key for install. I am just lost on the first 2 on what to select and name of parameter.

I added the option to enable local user to override profile configuration but still get a message saying the script run succesfuly but agent not installed on computer.

Good morning. On the first portion of the script that triggers to configure parameters in Xcitium. Which of the 4 options do I pick (integer, float, string or list)? Than I am replacing ‘parameterName’ with ‘JumpCloudConnectKey’. What do I put for End Point Manger Label? For the last step in Default Value i put my key xxxxxxxxxxxx?

#To define a particular parameter, replace the ‘parameterName’ inside itsm.getParameter(‘parameterName’) with that parameter’s name
key=itsm.getParameter(‘parameterName’)
ps_content=r’’’

Thanks

Hi @enrique.resendez ,

You may change itsm.getParameter(‘parameterName’) to itsm.getParameter(‘JumpCloudConnectKey’) - in that case I presume the key is a string - therefore type of the parameter should be String.

Endpoint Manager Label is optional - it determines how the parameter is going to be shown on the UI.

You may setup a default value to the parameter - in this case if the parameter is not set upon executing the procedure - it will use the default value. If you do not set a default value to a parameter, the system will ask to put a value each time you run the procedure.

Thanks for your quick reply. So if I set a default parameter than I would not need to configure any more parameters in the parameters tab.
Would this be how it works where xxxxxxxxx = the key? this will automatically insert the key in the excecution of exe?

key=itsm.getParameter(‘xxxxxxxxxxxxxxxxx’)
ps_content=r’’’

Script should have itsm.getParameter(‘JumpCloudConnectKey’) → here JumpCloudConnectKey word is the name of the parameter. The value is the “Default Value” field under Parameters section.

For detailed information with examples, you can check related help guide.

Please let me know if you have any questions.

this is failed response with parameters

Traceback (most recent call last):
File “”, line 9, in
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc2 in position 70: ordinal not in range(128)

Hi @enrique.resendez ,

There is a support ticket #4850062 for your script request. Our backend team will reach you for setting remote session with our script developer to analyze and fix the issue.

Kind Regards,
PremJK

Has this been resolved? We are also looking to implement JumpCloud and would appreciate using this script to remote install the JumpCloud agent.

Thank you,
Matt

Hi @NTELogic ,

yes, the issue was resolved and latest script is updated here
https://scripts.itarian.com/frontend/web/topic/script-to-install-jumpcloud-agent

Please try and provide your feedback.

Kind Regards,
PremJK

Successfully ran the script on two test endpoints. Worked perfectly! Thank you for the efforts and support!!

1 Like