How to Use JumpCloud PowerShell Module for Bulk User Management?
Introduction
The JumpCloud Admin Console is great for managing 10 users. It is terrible for managing 1,000. To scale your IT operations, you must use the JumpCloud PowerShell Module. This wrapper allows you to perform bulk actions in seconds that would take hours by clicking.
1. Installation & Connection
First, install the module from the official PowerShell Gallery.
# 1. Install the Module (Run as Admin)
Install-Module -Name JumpCloud -Scope CurrentUser -Force
# 2. Connect to API
# You will need your API Key from: Settings > API Keys
Connect-JCOnline -JumpCloudApiKey "YOUR_API_KEY_HERE"2. Recipe: Bulk User Import with Groups
Scenario: You have a CSV of 50 new hires, and you need to assign them to the "All Staff" group and the "M365" application group.
$NewHires = Import-Csv "C:\Temp\NewHires.csv"
foreach ($User in $NewHires) {
# Create the User
$NewUser = New-JCUser -Username $User.Username -Email $User.Email -Firstname $User.First -Lastname $User.Last
# Add to "All Staff" User Group (ID found in Console URL)
Add-JCUserGroupMember -GroupName "All Staff" -Username $User.Username
# Add to M365 Application Group
Add-JCUserGroupMember -GroupName "M365 Access" -Username $User.Username
Write-Host "Created $($User.Username)"
}3. Recipe: The "Terminator" Script (Emergency Offboarding)
When an employee is terminated for cause, speed is critical. This script performs a "Hard Lock":
$TerminatedUser = "bad.employee"
# 1. Suspend Account (Kills Portal Access)
Set-JCUser -Username $TerminatedUser -Suspended $true
# 2. Revoke All RADIUS Keys (Kills Wi-Fi)
Remove-JCUserRadiusServer -Username $TerminatedUser -All
# 3. Wipe Sessions (Kills Active SSO Tokens)
# Note: This requires the V2 API command
Invoke-JCUserSessionRevoke -Username $TerminatedUser
Write-Host "$TerminatedUser has been neutralized."4. Reporting: Who Has Admin Rights?
Auditors often ask: "Show me every computer where 'John' is a Local Admin."
Get-JCSystemUser | Where-Object { $_.admin -eq $true } | Select-Object Username, SystemIDFAQ
1) Why should I use the JumpCloud PowerShell module instead of the console?
PowerShell allows bulk actions like user creation, group assignments, and offboarding in seconds, saving hours compared to manual console operations.
2) How do I connect PowerShell to JumpCloud?
Install the JumpCloud module and run Connect-JCOnline using your API key from JumpCloud Settings > API Keys.
3) Can I bulk assign users to groups and applications?
Yes. Use Import-Csv with New-JCUser and Add-JCUserGroupMember commands to automate group and app assignments for multiple users.
4) How can I immediately disable a terminated employee’s access?
Suspend the user, revoke RADIUS keys, and revoke active sessions using PowerShell commands for instant access termination.
5) Can PowerShell help generate admin access reports for audits?
Yes. Use Get-JCSystemUser with filters to list which users have local admin rights on which systems for compliance reporting.
