Add users to a user group in bulk Using a CSV File from PowerShell

Add users to a user group in bulk Using a CSV File from PowerShell

Add Users to a User Group in Bulk using Powershell


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 generate 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.


Below is the instruction to Add users to a user group in bulk Using a CSV File from PowerShell


1. Create a CSV file with the following format:

   Filename: groupimport.csv
   Example Contents:
GroupName, Username
All Users, bruce.springsteen
Office 365 Users, bruce.springsteen
Admins, bruce.springsteen
All Users, steven.vanzandt
Office 365 Users, steven.vanzandt
All Users, patti.scialfa
All Users, max.weinberg
2. Save the CSV file in the following location:

C:\Windows\System32\

3. Run the following PowerShell command to import the CSV and add users to their respective groups:

 Import-CSV ./groupimport.csv | Add-JCUserGroupMember