# Looking for help building a script to install JumpCloud agent

**URL:** <https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929>\
**Category:** Request a Script\
**Created:** [December 6, 2022, 2:27am UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929 "2022-12-06T02:27:09Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![enrique.resendez](https://forum-upgrade-test.xcitium.com/letter_avatar_proxy/v4/letter/e/c4cdca/32.png) [@enrique.resendez](https://forum-upgrade-test.xcitium.com/u/enrique.resendez)\
**Post date:** [December 6, 2022, 2:27am UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/1 "2022-12-06T02:27:09Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![ilgaz](https://forum-upgrade-test.xcitium.com/user_avatar/forum-upgrade-test.xcitium.com/ilgaz/32/883_2.png) [@ilgaz](https://forum-upgrade-test.xcitium.com/u/ilgaz)\
**Post date:** [December 6, 2022, 7:35am UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/2 "2022-12-06T07:35:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![PremJKumar](https://forum-upgrade-test.xcitium.com/user_avatar/forum-upgrade-test.xcitium.com/premjkumar/32/883_2.png) [@PremJKumar](https://forum-upgrade-test.xcitium.com/u/PremJKumar)\
**Post date:** [December 6, 2022, 3:12pm UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/3 "2022-12-06T15:12:25Z")

</div>

Hi @enrique.resendez ,

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

Kind Regards,  
PremJK

---

<div class="post-metadata">

**Author:** ![enrique.resendez](https://forum-upgrade-test.xcitium.com/letter_avatar_proxy/v4/letter/e/c4cdca/32.png) [@enrique.resendez](https://forum-upgrade-test.xcitium.com/u/enrique.resendez)\
**Post date:** [December 6, 2022, 4:54pm UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/4 "2022-12-06T16:54:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![enrique.resendez](https://forum-upgrade-test.xcitium.com/letter_avatar_proxy/v4/letter/e/c4cdca/32.png) [@enrique.resendez](https://forum-upgrade-test.xcitium.com/u/enrique.resendez)\
**Post date:** [December 7, 2022, 1:14am UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/5 "2022-12-07T01:14:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![enrique.resendez](https://forum-upgrade-test.xcitium.com/letter_avatar_proxy/v4/letter/e/c4cdca/32.png) [@enrique.resendez](https://forum-upgrade-test.xcitium.com/u/enrique.resendez)\
**Post date:** [December 7, 2022, 1:29pm UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/6 "2022-12-07T13:29:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ilgaz](https://forum-upgrade-test.xcitium.com/user_avatar/forum-upgrade-test.xcitium.com/ilgaz/32/883_2.png) [@ilgaz](https://forum-upgrade-test.xcitium.com/u/ilgaz)\
**Post date:** [December 7, 2022, 1:48pm UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/7 "2022-12-07T13:48:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![enrique.resendez](https://forum-upgrade-test.xcitium.com/letter_avatar_proxy/v4/letter/e/c4cdca/32.png) [@enrique.resendez](https://forum-upgrade-test.xcitium.com/u/enrique.resendez)\
**Post date:** [December 7, 2022, 2:52pm UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/8 "2022-12-07T14:52:43Z")

</div>

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’’’

---

<div class="post-metadata">

**Author:** ![ilgaz](https://forum-upgrade-test.xcitium.com/user_avatar/forum-upgrade-test.xcitium.com/ilgaz/32/883_2.png) [@ilgaz](https://forum-upgrade-test.xcitium.com/u/ilgaz)\
**Post date:** [December 7, 2022, 6:22pm UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/9 "2022-12-07T18:22:22Z")

</div>

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.

> **[Xcitium Enterprise Admin Guide - Create a Custom Procedure | Xcitium](https://help.platform.comodo.com/topic-463-1-1029-15726-Create-a-Custom-Procedure.html#cus_script_proc)**
>
> Admins can create a custom script or patch procedure for remote deployment to managed Mac and Windows devices.

Please let me know if you have any questions.

---

<div class="post-metadata">

**Author:** ![enrique.resendez](https://forum-upgrade-test.xcitium.com/letter_avatar_proxy/v4/letter/e/c4cdca/32.png) [@enrique.resendez](https://forum-upgrade-test.xcitium.com/u/enrique.resendez)\
**Post date:** [December 7, 2022, 11:08pm UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/10 "2022-12-07T23:08:24Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![PremJKumar](https://forum-upgrade-test.xcitium.com/user_avatar/forum-upgrade-test.xcitium.com/premjkumar/32/883_2.png) [@PremJKumar](https://forum-upgrade-test.xcitium.com/u/PremJKumar)\
**Post date:** [December 8, 2022, 10:25am UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/11 "2022-12-08T10:25:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![NTELogic](https://forum-upgrade-test.xcitium.com/user_avatar/forum-upgrade-test.xcitium.com/ntelogic/32/218_2.png) [@NTELogic](https://forum-upgrade-test.xcitium.com/u/NTELogic)\
**Post date:** [December 18, 2022, 8:36pm UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/12 "2022-12-18T20:36:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![PremJKumar](https://forum-upgrade-test.xcitium.com/user_avatar/forum-upgrade-test.xcitium.com/premjkumar/32/883_2.png) [@PremJKumar](https://forum-upgrade-test.xcitium.com/u/PremJKumar)\
**Post date:** [December 19, 2022, 10:40am UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/13 "2022-12-19T10:40:46Z")

</div>

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](https://scripts.itarian.com/frontend/web/topic/script-to-install-jumpcloud-agent)

Please try and provide your feedback.

Kind Regards,  
PremJK

---

<div class="post-metadata">

**Author:** ![NTELogic](https://forum-upgrade-test.xcitium.com/user_avatar/forum-upgrade-test.xcitium.com/ntelogic/32/218_2.png) [@NTELogic](https://forum-upgrade-test.xcitium.com/u/NTELogic)\
**Post date:** [December 22, 2022, 4:33am UTC](https://forum-upgrade-test.xcitium.com/t/looking-for-help-building-a-script-to-install-jumpcloud-agent/13929/14 "2022-12-22T04:33:14Z")

</div>

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