This article walks through two commands designed to be used in tandem for bulk updating devices in JumpCloud using a CSV file.
- GitHub - New-JCDeviceUpdateTemplate
- GitHub - Update-JCDeviceFromCSV
The first command creates the .CSV update template file on the local machine, which you can then use to populate with device information and import that information to bulk update the devices using the second command.
Prerequisites:
- You must have an API key to authenticate before running the script. See JumpCloud APIs for more information.
- You must have an Administrator role in JumpCloud to be able to run the script.
- The script requires PowerShell 5.1 or higher.
- The JumpCloud PowerShell Module must be installed.
- If not installed, open PowerShell as an Administrator and run
Install-Module -Name JumpCloud
to install.
- If not installed, open PowerShell as an Administrator and run
Creating the CSV Update File
Open a PowerShell terminal, enter the PowerShell command Connect-JCOnline
at the prompt, and pass in your JumpCloud API key to authenticate the PowerShell session to the JumpCloud API.
The command New-JCDeviceUpdateTemplate
creates an updated CSV file on the JumpCloud administrator's local machine.
New-JCDeviceUpdateTemplate
After running the command, you’ll be asked a series of interactive questions in the terminal. The answers to these questions will define the column headers that are added to the CSV import file that is created by this command.
Upon uploading the file for bulk update, any empty values will be ignored; updates will only be made if there is a value present in the field in the CSV.
Question 1
The CSV file will be created within the directory:
/Users/[user]/ps_scripts
Enter Y to confirm or N to change output location:
- To create the file in this location, enter Y.
- If you want to choose a different output location, press N and provide a full path to the folder where you want to create the file.
Question 2
Would you like to populate this update template with all of your existing systems?
You can remove systems you do not wish to modify from the import file after it is created.
Enter Y for Yes or N for No:
- To add a row to the update file for each existing device, enter Y at the prompt.
- Enter N if you want to add a column to the template for DeviceID, but not import any device IDs.
Question 3
Would you like to update device descriptions?
Enter Y for Yes or N for No:
- To add a column to the import file to update the device description, enter Y at the prompt.
Questions 4-7 allow you to make bulk updates to MFA settings on a per-device basis. See Configure SSH Settings to learn more about these settings.
Question 4
Would you like to update allowing SSH Password Authentication?
Enter Y for Yes or N for No:
- To add a column to the import file to Allow SSH Password Login for the device, enter Y at the prompt.
Question 5
Would you like to update allowing SSH Root Login?
Enter Y for Yes or N for No:
- To add a column to the import file to allow SSH Root access for the device, enter Y at the prompt.
Question 6
Would you like to update allowing MFA?
Enter Y for Yes or N for No:
- To add a column to the import file to allow MFA for the device, enter Y at the prompt.
Question 7
Would you like to update allowing Public Key Authentication?
Enter Y for Yes or N for No:
- To add a column to the import file to enable public key authentication for the device, enter Y at the prompt.
Question 8
Would you like to update allowing System Insights?
Enter Y for Yes or N for No:
- To add a column to the import file to enable System Insights for the device, enter Y at the prompt.
Question 9
Would you like to set a primary system user?
Enter Y for Yes or N for No:
- To add a primarySystemUser column to the import file to designate the primary user of the device, enter Y at the prompt.
- Only fields populated with a username or user ID will be imported.
- Only users that are directly bound to the device can be assigned as primary users; indirectly bound users are ignored.
Question 10 (only presents if the file name already exists)
WARNING: The file JCDeviceUpdateImport_06-24-2025.csv already exists do you want to overwrite it?
Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"):
The file is created in the location specified in the first question, and you are asked if you’d like to open the file. Enter Y to populate the CSV file. When you have completed editing the file, continue to the next section.
Importing the CSV Update File
Run the Update-JCDeviceFromCSV
command and enter the full path to the CSV update file when prompted for the CSVFilePath:
.
Review the update summary.
Number of devices to update = N
Would you like to update these Devices?
Press Y to confirm or N to quit:
Enter Y. Devices that are not able to be updated result in errors. Successful updates are automatically reflected in the JumpCloud Admin Portal.