New PowerShell Function: Get-JCAdmin - Audit admins in your organization(s)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2024 12:20 PM
Function Overview:
Admins need to know which of their other JumpCloud admins have MFA/TOTP enabled as well as some other auditing practices such as an admin's state, or even when the last time their API key was rotated. The new, Get-JCAdmin, function will allow admins the ability to do just that, as well as some other things. We are introducing this function simply to allow admins an easier way of auditing their environment and exporting the results quickly to a CSV or any other file type.
Currently, there are no plans into implement creating/editing admins within the PowerShell module, for now that will have to be done inside the Console.
Function Parameters
- email - A search filter parameter that accepts string wildcards to filter results based on an inputted email address
- enableMultifactor - A search filter parameter that accepts boolean to filter for Multifactor enabled/disabled (true/false)
- totpEnrolled - A search filter parameter that accepts boolean to filter for totp enrolled/disabled (true/false)
- roleName - A search filter parameter that accepts an enum ('Administrator With Billing', 'Administrator', 'Manager', 'Command Runner With Billing', 'Command Runner', 'Help Desk', 'Billing Only', 'Read Only') to filter for an admin's role
- organization - A search filter parameter that accepts a string for an organization ID. This is only used for those on an MTP/MSP tenant
Return Object
apiKeyUpdatedAt : 7/5/2023 11:17:29 PM
created : 5/11/2022 4:12:00 PM
email : geoffrey.wein+readonly@jumpcloud.com
enableMultiFactor : False
firstname : Geoffrey
lastname : Wein
organization : organizationID
roleName : Read Only
suspended : False
totpEnrolled : False
totpUpdatedAt :
Use Examples:
General Use
Example 1: Find all admins in your organization
Get-JCAdmin
If you are in an MTP/MSP tenant, this will return all admins across all of your organizations
Example 2: Find admins by email address in your organization
Get-JCAdmin -email 'john.doe@example.com'
The email parameter accepts wildcards for filtering so if you don't know the exact admin's email address you can do the following:
Get-JCAdmin -email 'john*'
Example 3: Find all admins that have multifactor enabled
Get-JCAdmin -enableMultifactor $true
Example 4: Find all admins that are totpEnrolled
Get-JCAdmin -totpEnrolled $true
Example 5: Find all admins that have a specific role
Get-JCAdmin -roleName "Administrator With Billing"
Example 6: Putting it all together - Finding admins from a specific domain, have multifactor disabled and are a specific role
Get-JCAdmin -email "*@example.com" -enableMultiFactor $false -roleName "Administrator With Billing"
- Labels:
-
PowerShell
![](/skins/images/C210B62239BAF37B0AB0FAEB086BB5F1/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/C210B62239BAF37B0AB0FAEB086BB5F1/responsive_peak/images/icon_anonymous_message.png)