Add & Remove the device in Device Group in bulk via Powershell

Add & Remove the device in Device Group in bulk via Powershell

📄 Summary

This article explains how to bulk add or remove systems from a JumpCloud system group using the Jumpcloud Powershell Module and a .csv file. 


✅ Prerequisites

Step 1

 Install the JumpCloud Module on your Powershell
( Windows/ MAC )


Install JumpCloud on Windows.


  • Open Powershell as Administrator.

  • Run this cmd -> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

  • Next this cmd -> Install-Module JumpCloud

  • If you are stuck anywhere refer to this LINK

  • If you are having trouble then reach out to support@netnxt.com



Install JumpCloud on MAC.


  • Download the Powershell From this LINK according to your device.

  • Powershell will be installed from the above step.

  • Open the Powershell and run this -> Install-Module JumpCloud

  • If you are stuck anywhere refer to this LINK

  • If you are having trouble then reach out to support@netnxt.com



Step 2


Connect your Powershell to JumpCloud by the below instructions


  • Open Powershell in Administrator

  • Run this cmd to connect JumpCloud -> Connect-JCOnline

  • Provide the API Key

Note - If you already generated/ newly generating the API key store it in a safe place and use it when it is needed. Do not generate it again as a result your previous key will be expired


Process to Adding or Removing the Bulk user in device group.

Note  -  You need to have a CSV file with system IDs of all the devices you want to add & Remove. 

✅ Add Devices to a Device Group

  1. Replace the <groupname> with the name of the group with no speecial characters.

    $systems = Import-Csv -Path '/Users/<username>/<filename>.csv' foreach ($system in $systems) { Add-JCSystemGroupMember -GroupName <Groupname> -SystemID $system.SystemID }


📸 You will see an output similar to the attached screenshot once the script runs successfully.



❌ Remove Devices from a Device Group 

  1. Replace the <groupname> with the name of the group with no speecial characters.

    $systems = Import-Csv -Path '/Users/<username>/<filename>.csv' foreach ($system in $systems) { Remove-JCSystemGroupMember -GroupName <Groupname> -SystemID $system.SystemID }


📸 You will see an output similar to the attached screenshot once the script runs successfully.


Helpful Article for Reference: