Bulk Add & Remove Devices in a JumpCloud Device Group via PowerShell (Using CSV)
Purpose
This article explains how to bulk add or remove devices from a JumpCloud Device Group using the JumpCloud PowerShell Module and a CSV file.
Prerequisites
- JumpCloud Administrator permissions
- JumpCloud API Key
- CSV file containing System IDs of devices
- PowerShell installed (Windows or macOS)
- JumpCloud PowerShell Module installed
Step-by-Step Instructions
Step 1 — Install JumpCloud PowerShell Module
Windows:
- Open PowerShell as Administrator
- Run the below:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned Install-Module JumpCloud
If stuck, refer to vendor documentation or contact our experts
macOS:
- Install PowerShell based on your macOS version
- Open PowerShell Terminal
- Run:
Install-Module JumpCloud
Step 2 — Connect PowerShell to JumpCloud
- Open PowerShell as Administrator
- Run this command:
Connect-JCOnline
- Enter your JumpCloud API Key
Note: Do not regenerate API keys unless required. Old key expires when new one is generated. Store keys securely.
Step 3 — Prepare your CSV with System IDs
The CSV must contain device System IDs under the column header SystemID.
Example:
SystemID 5fxxxxxx 6axxxxxx 7bxxxxxx
Step 4 — Add Devices to Device Group in bulk
Replace <GroupName> with your device group name (Do not use special characters).
$systems = Import-Csv -Path '/Users/<username>/<filename>.csv'
foreach ($system in $systems) {
Add-JCSystemGroupMember -GroupName <GroupName> -SystemID $system.SystemID
}
Step 5 — Remove Devices from Device Group in bulk
Replace <GroupName> with your device group name (Do not use special characters).
$systems = Import-Csv -Path '/Users/<username>/<filename>.csv'
foreach ($system in $systems) {
Remove-JCSystemGroupMember -GroupName <GroupName> -SystemID $system.SystemID
}
Expected Result / Validation
Devices will be successfully added or removed from the selected JumpCloud Device Group.
You can verify by opening JumpCloud Console → Device Groups → View Members.
FAQs
Q1. Why is my API key not working in Connect-JCOnline?
Your API key may be expired or incorrectly copied. JumpCloud invalidates the previous key once a new one is generated. Always store your API key securely and avoid regenerating unless required.
Q2. The script runs, but devices are not added or removed. What is wrong?
Most common reason is incorrect CSV formatting. Ensure your CSV has only one column with header exactly named SystemID. No spaces, no special characters.
Q3. I get Access Denied or Permission errors while running commands.
This happens if your API key or user role does not have proper admin rights. Make sure you are using an Admin level API key with permissions to modify device groups.
Q4. Can I use group names with spaces or symbols?
Avoid special characters. Use clean and simple names. For spaces you can use hyphens or CamelCase. Example: WindowsLaptops or Remote-Laptops.
