diff --git a/PowerShell/JumpCloud Module/Docs/Add-JCGsuiteMember.md b/PowerShell/JumpCloud Module/Docs/Add-JCGsuiteMember.md new file mode 100644 index 000000000..00faa39f9 --- /dev/null +++ b/PowerShell/JumpCloud Module/Docs/Add-JCGsuiteMember.md @@ -0,0 +1,149 @@ +--- +external help file: JumpCloud-help.xml +Module Name: JumpCloud +online version: https://github.com/TheJumpCloud/support/wiki/ +schema: 2.0.0 +--- + +# Add-JCGsuiteMember + +## SYNOPSIS +Adds a user or usergroup to a GSuite instance + +## SYNTAX + +### ByName +``` +Add-JCGsuiteMember [-Name ] [-Username ] [-UserID ] [-GroupID ] + [-GroupName ] [] +``` + +### ByID +``` +Add-JCGsuiteMember [-ID ] [-Username ] [-UserID ] [-GroupID ] + [-GroupName ] [] +``` + +## DESCRIPTION +The Add-JCGsuiteMember function allows you to add users or UserGroups to a GSuite Cloud Directory instance in your organization + +## EXAMPLES + +### Example 1 +```powershell +Add-JCGsuiteMember -Name 'JumpCloud Gsuite' -Username 'john.doe' +``` + +Adds the user john.doe to the JumpCloud GSuite CloudDirectory instance + +### Example 2 +```powershell +Add-JCGsuiteMember -Name 'JumpCloud Gsuite' -GroupName 'Sales Users' +``` + +Adds the Sales Users UserGroup to the JumpCloud GSuite CloudDirectory instance + +## PARAMETERS + +### -GroupID +A UserGroup ID to add to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -GroupName +A UserGroup name to add to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -ID +The ID of cloud directory instance + +```yaml +Type: System.String +Parameter Sets: ByID +Aliases: _id + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Name +The name of cloud directory instance + +```yaml +Type: System.String +Parameter Sets: ByName +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -UserID +A UserID to add to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Username +A username to add to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/PowerShell/JumpCloud Module/Docs/Add-JCOffice365Member.md b/PowerShell/JumpCloud Module/Docs/Add-JCOffice365Member.md new file mode 100644 index 000000000..0efd934c6 --- /dev/null +++ b/PowerShell/JumpCloud Module/Docs/Add-JCOffice365Member.md @@ -0,0 +1,149 @@ +--- +external help file: JumpCloud-help.xml +Module Name: JumpCloud +online version: https://github.com/TheJumpCloud/support/wiki/ +schema: 2.0.0 +--- + +# Add-JCOffice365Member + +## SYNOPSIS +Adds a user or usergroup to an Office365 instance + +## SYNTAX + +### ByName +``` +Add-JCOffice365Member [-Name ] [-Username ] [-UserID ] [-GroupID ] + [-GroupName ] [] +``` + +### ByID +``` +Add-JCOffice365Member [-ID ] [-Username ] [-UserID ] [-GroupID ] + [-GroupName ] [] +``` + +## DESCRIPTION +The Add-JCOffice365Member function allows you to add users or UserGroups to a GSuite Cloud Directory instance in your organization + +## EXAMPLES + +### Example 1 +```powershell +Add-JCOffice365Member -Name 'JumpCloud Office365' -Username 'john.doe' +``` + +Adds the user john.doe to the JumpCloud Office365 CloudDirectory instance + +### Example 2 +```powershell +Add-JCOffice365Member -Name 'JumpCloud Office365' -GroupName 'Sales Users' +``` + +Adds the Sales Users UserGroup to the JumpCloud Office365 CloudDirectory instance + +## PARAMETERS + +### -GroupID +A UserGroup ID to add to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -GroupName +A UserGroup name to add to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -ID +The ID of cloud directory instance + +```yaml +Type: System.String +Parameter Sets: ByID +Aliases: _id + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Name +The name of cloud directory instance + +```yaml +Type: System.String +Parameter Sets: ByName +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -UserID +A UserID to add to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Username +A username to add to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/PowerShell/JumpCloud Module/Docs/Connect-JCOnline.md b/PowerShell/JumpCloud Module/Docs/Connect-JCOnline.md index c8129c59c..1d8a948e1 100644 --- a/PowerShell/JumpCloud Module/Docs/Connect-JCOnline.md +++ b/PowerShell/JumpCloud Module/Docs/Connect-JCOnline.md @@ -13,8 +13,8 @@ The Connect-JCOnline function sets the global variable $JCAPIKEY ## SYNTAX ``` -Connect-JCOnline [-force] [[-JumpCloudApiKey] ] [[-JumpCloudOrgId] ] - [[-JCEnvironment] ] [] +Connect-JCOnline [-force] [-JumpCloudApiKey] [[-JumpCloudOrgId] ] [[-JCEnvironment] ] + [] ``` ## DESCRIPTION @@ -88,7 +88,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: 1 Default value: None Accept pipeline input: True (ByPropertyName) diff --git a/PowerShell/JumpCloud Module/Docs/JumpCloud.md b/PowerShell/JumpCloud Module/Docs/JumpCloud.md index 009559bd2..c48e4cc7d 100644 --- a/PowerShell/JumpCloud Module/Docs/JumpCloud.md +++ b/PowerShell/JumpCloud Module/Docs/JumpCloud.md @@ -2,7 +2,7 @@ Module Name: JumpCloud Module Guid: 31c023d1-a901-48c4-90a3-082f91b31646 Download Help Link: https://github.com/TheJumpCloud/support/wiki -Help Version: 2.9.1 +Help Version: 2.10.0 Locale: en-US --- @@ -17,6 +17,12 @@ Create an association between two object within the JumpCloud console. ### [Add-JCCommandTarget](Add-JCCommandTarget.md) Associates a JumpCloud system or a JumpCloud system group with a JumpCloud command +### [Add-JCGsuiteMember](Add-JCGsuiteMember.md) +Adds users or usergroups to a GSuite Cloud Directory Instance + +### [Add-JCOffice365Member](Add-JCOffice365Member.md) +Adds users or usergroups to an Office365 Cloud Directory Instance + ### [Add-JCRadiusReplyAttribute](Add-JCRadiusReplyAttribute.md) Adds Radius reply attributes to a JumpCloud user group. @@ -166,6 +172,12 @@ Removes a JumpCloud Command Result ### [Remove-JCCommandTarget](Remove-JCCommandTarget.md) Removes the association between a JumpCloud system or a JumpCloud system group from a JumpCloud command +### [Remove-JCGsuiteMember](Remove-JCGsuiteMember.md) +Removes users or usergroups from a GSuite Cloud Directory Instance + +### [Remove-JCOffice365Member](Remove-JCOffice365Member.md) +Removes users or usergroups from an Office365 Cloud Directory Instance + ### [Remove-JCPolicy](Remove-JCPolicy.md) Removes a JumpCloud Policy diff --git a/PowerShell/JumpCloud Module/Docs/Remove-JCGsuiteMember.md b/PowerShell/JumpCloud Module/Docs/Remove-JCGsuiteMember.md new file mode 100644 index 000000000..075d3a8bb --- /dev/null +++ b/PowerShell/JumpCloud Module/Docs/Remove-JCGsuiteMember.md @@ -0,0 +1,149 @@ +--- +external help file: JumpCloud-help.xml +Module Name: JumpCloud +online version: https://github.com/TheJumpCloud/support/wiki/ +schema: 2.0.0 +--- + +# Remove-JCGsuiteMember + +## SYNOPSIS +Removes a user or usergroup from a GSuite instance + +## SYNTAX + +### ByName +``` +Remove-JCGsuiteMember [-Name ] [-Username ] [-UserID ] [-GroupID ] + [-GroupName ] [] +``` + +### ByID +``` +Remove-JCGsuiteMember [-ID ] [-Username ] [-UserID ] [-GroupID ] + [-GroupName ] [] +``` + +## DESCRIPTION +The Remove-JCGsuiteMember function allows you to remove users or UserGroups from a GSuite Cloud Directory instance in your organization + +## EXAMPLES + +### Example 1 +```powershell +Remove-JCGsuiteMember -Name 'JumpCloud Gsuite' -Username 'john.doe' +``` + +Removes the user john.doe from the JumpCloud GSuite CloudDirectory instance + +### Example 2 +```powershell +Remove-JCGsuiteMember -Name 'JumpCloud Gsuite' -GroupName 'Sales Users' +``` + +Removes the Sales Users UserGroup from the JumpCloud GSuite CloudDirectory instance + +## PARAMETERS + +### -GroupID +A UserGroup ID to remove to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -GroupName +A UserGroup name to remove to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -ID +The ID of cloud directory instance + +```yaml +Type: System.String +Parameter Sets: ByID +Aliases: _id + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Name +The name of cloud directory instance + +```yaml +Type: System.String +Parameter Sets: ByName +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -UserID +A UserID to remove to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Username +A username to remove to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/PowerShell/JumpCloud Module/Docs/Remove-JCOffice365Member.md b/PowerShell/JumpCloud Module/Docs/Remove-JCOffice365Member.md new file mode 100644 index 000000000..78b3c150e --- /dev/null +++ b/PowerShell/JumpCloud Module/Docs/Remove-JCOffice365Member.md @@ -0,0 +1,149 @@ +--- +external help file: JumpCloud-help.xml +Module Name: JumpCloud +online version: https://github.com/TheJumpCloud/support/wiki/ +schema: 2.0.0 +--- + +# Remove-JCOffice365Member + +## SYNOPSIS +Removes a user or usergroup from an Office365 instance + +## SYNTAX + +### ByName +``` +Remove-JCOffice365Member [-Name ] [-Username ] [-UserID ] [-GroupID ] + [-GroupName ] [] +``` + +### ByID +``` +Remove-JCOffice365Member [-ID ] [-Username ] [-UserID ] [-GroupID ] + [-GroupName ] [] +``` + +## DESCRIPTION +The Remove-JCOffice365Member function allows you to remove users or UserGroups from a GSuite Cloud Directory instance in your organization + +## EXAMPLES + +### Example 1 +```powershell +Remove-JCOffice365Member -Name 'JumpCloud Office365' -Username 'john.doe' +``` + +Removes the user john.doe from the JumpCloud Office365 CloudDirectory instance + +### Example 2 +```powershell +Remove-JCOffice365Member -Name 'JumpCloud Office365' -GroupName 'Sales Users' +``` + +Removes the Sales Users UserGroup from the JumpCloud Office365 CloudDirectory instance + +## PARAMETERS + +### -GroupID +A UserGroup ID to remove to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -GroupName +A UserGroup name to remove to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -ID +The ID of cloud directory instance + +```yaml +Type: System.String +Parameter Sets: ByID +Aliases: _id + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Name +The name of cloud directory instance + +```yaml +Type: System.String +Parameter Sets: ByName +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -UserID +A UserID to remove to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Username +A username to remove to the directory + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/PowerShell/JumpCloud Module/Docs/Set-JCSettingsFile.md b/PowerShell/JumpCloud Module/Docs/Set-JCSettingsFile.md index c4d5122ea..acec2d831 100644 --- a/PowerShell/JumpCloud Module/Docs/Set-JCSettingsFile.md +++ b/PowerShell/JumpCloud Module/Docs/Set-JCSettingsFile.md @@ -14,7 +14,7 @@ Updates the JumpCloud Module Settings File ## SYNTAX ``` -Set-JCSettingsFile [-parallelOverride ] [-moduleBannerMessageCount ] [] +Set-JCSettingsFile [-moduleBannerMessageCount ] [-parallelOverride ] [] ``` ## DESCRIPTION diff --git a/PowerShell/JumpCloud Module/JumpCloud.psd1 b/PowerShell/JumpCloud Module/JumpCloud.psd1 index d72f63690..fe072a986 100644 --- a/PowerShell/JumpCloud Module/JumpCloud.psd1 +++ b/PowerShell/JumpCloud Module/JumpCloud.psd1 @@ -3,7 +3,7 @@ # # Generated by: JumpCloud Solutions Architect Team # -# Generated on: 1/2/2024 +# Generated on: 1/17/2024 # @{ @@ -12,7 +12,7 @@ RootModule = 'JumpCloud.psm1' # Version number of this module. -ModuleVersion = '2.9.1' +ModuleVersion = '2.10.0' # Supported PSEditions # CompatiblePSEditions = @() @@ -71,24 +71,26 @@ RequiredModules = @('JumpCloud.SDK.DirectoryInsights', # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = 'Add-JCAssociation', 'Add-JCCommandTarget', - 'Add-JCRadiusReplyAttribute', 'Add-JCSystemGroupMember', - 'Add-JCSystemUser', 'Add-JCUserGroupMember', 'Backup-JCOrganization', - 'Connect-JCOnline', 'Copy-JCAssociation', 'Get-JCAssociation', - 'Get-JCBackup', 'Get-JCCloudDirectory', 'Get-JCCommand', - 'Get-JCCommandResult', 'Get-JCCommandTarget', 'Get-JCEvent', - 'Get-JCEventCount', 'Get-JCGroup', 'Get-JCOrganization', 'Get-JCPolicy', - 'Get-JCPolicyResult', 'Get-JCPolicyTargetGroup', - 'Get-JCPolicyTargetSystem', 'Get-JCRadiusReplyAttribute', - 'Get-JCRadiusServer', 'Get-JCSystem', 'Get-JCSystemApp', - 'Get-JCSystemGroupMember', 'Get-JCSystemInsights', 'Get-JCSystemUser', - 'Get-JCUser', 'Get-JCUserGroupMember', 'Import-JCCommand', - 'Import-JCMSPFromCSV', 'Import-JCUsersFromCSV', 'Invoke-JCCommand', - 'Invoke-JCDeployment', 'New-JCCommand', 'New-JCDeploymentTemplate', - 'New-JCImportTemplate', 'New-JCMSPImportTemplate', 'New-JCPolicy', - 'New-JCRadiusServer', 'New-JCSystemGroup', 'New-JCUser', - 'New-JCUserGroup', 'Remove-JCAssociation', 'Remove-JCCommand', - 'Remove-JCCommandResult', 'Remove-JCCommandTarget', 'Remove-JCPolicy', +FunctionsToExport = 'Add-JCAssociation', 'Add-JCCommandTarget', 'Add-JCGsuiteMember', + 'Add-JCOffice365Member', 'Add-JCRadiusReplyAttribute', + 'Add-JCSystemGroupMember', 'Add-JCSystemUser', + 'Add-JCUserGroupMember', 'Backup-JCOrganization', 'Connect-JCOnline', + 'Copy-JCAssociation', 'Get-JCAssociation', 'Get-JCBackup', + 'Get-JCCloudDirectory', 'Get-JCCommand', 'Get-JCCommandResult', + 'Get-JCCommandTarget', 'Get-JCEvent', 'Get-JCEventCount', 'Get-JCGroup', + 'Get-JCOrganization', 'Get-JCPolicy', 'Get-JCPolicyResult', + 'Get-JCPolicyTargetGroup', 'Get-JCPolicyTargetSystem', + 'Get-JCRadiusReplyAttribute', 'Get-JCRadiusServer', 'Get-JCSystem', + 'Get-JCSystemApp', 'Get-JCSystemGroupMember', 'Get-JCSystemInsights', + 'Get-JCSystemUser', 'Get-JCUser', 'Get-JCUserGroupMember', + 'Import-JCCommand', 'Import-JCMSPFromCSV', 'Import-JCUsersFromCSV', + 'Invoke-JCCommand', 'Invoke-JCDeployment', 'New-JCCommand', + 'New-JCDeploymentTemplate', 'New-JCImportTemplate', + 'New-JCMSPImportTemplate', 'New-JCPolicy', 'New-JCRadiusServer', + 'New-JCSystemGroup', 'New-JCUser', 'New-JCUserGroup', + 'Remove-JCAssociation', 'Remove-JCCommand', 'Remove-JCCommandResult', + 'Remove-JCCommandTarget', 'Remove-JCGsuiteMember', + 'Remove-JCOffice365Member', 'Remove-JCPolicy', 'Remove-JCRadiusReplyAttribute', 'Remove-JCRadiusServer', 'Remove-JCSystem', 'Remove-JCSystemGroup', 'Remove-JCSystemGroupMember', 'Remove-JCSystemUser', 'Remove-JCUser', diff --git a/PowerShell/JumpCloud Module/Public/Directory/Add-JCGsuiteMember.ps1 b/PowerShell/JumpCloud Module/Public/Directory/Add-JCGsuiteMember.ps1 new file mode 100644 index 000000000..19019b280 --- /dev/null +++ b/PowerShell/JumpCloud Module/Public/Directory/Add-JCGsuiteMember.ps1 @@ -0,0 +1,98 @@ +function Add-JCGsuiteMember () { + param( + [Parameter( ValueFromPipelineByPropertyName, ParameterSetName = 'ByName', HelpMessage = 'The name of cloud directory instance')] + [String]$Name, + [Parameter( ValueFromPipelineByPropertyName, ParameterSetName = 'ByID', HelpMessage = 'The ID of cloud directory instance')] + [Alias('_id')] + [String]$ID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A username to add to the directory')] + [String]$Username, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserID to add to the directory')] + [String]$UserID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserGroup ID to add to the directory')] + [String]$GroupID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserGroup name to add to the directory')] + [String]$GroupName + ) + begin { + Write-Debug 'Verifying JCAPI Key' + if ($JCAPIKEY.length -ne 40) { + Connect-JCOnline + } + $resultsArray = [System.Collections.Generic.List[PSObject]]::new() + $DirectoryHash = Get-JcSdkDirectory | Where-Object type -EQ 'g_suite' | Select-Object id, name + if (($Username -or $UserID) -and ($GroupID -or $GroupName)) { + throw "Please add one type of association per call" + } elseif ($Username -and $UserID) { + throw "Please use either a username or a userID" + } elseif ($GroupID -and $GroupName) { + throw "Please use either a UserGroup Name or a UserGroup ID" + } + } + process { + switch ($PSCmdlet.ParameterSetName) { + ByName { + Write-Debug "Finding directory by Name" + $CloudDirectory = $DirectoryHash | Where-Object name -EQ $Name + if (!$CloudDirectory) { + throw "$Name was not found. Please try again" + } elseif ($CloudDirectory.count -gt 1) { + throw "Multiple directories with the same name detected, please use the -id parameter to specify which directory to edit" + } + } + ByID { + Write-Debug "Finding directory by ID" + $CloudDirectory = $DirectoryHash | Where-Object Id -EQ $ID + if (!$CloudDirectory) { + throw "$ID was not found. Please try again" + } + } + } + if ($Username -or $UserID) { + if ($Username) { + $UserID = Get-JCUser -username $Username -returnProperties username | Select-Object -ExpandProperty _id + if (!$UserID) { + throw "Username: $Username was not found." + } + } + Set-JcSdkGSuiteAssociation -GsuiteId $CloudDirectory.Id -Op 'add' -Type 'user' -Id $UserID -ErrorVariable addError -ErrorAction SilentlyContinue + if ($addError) { + $Status = $addError.ErrorDetails.Message + } else { + $Status = 'Added' + } + $FormattedResults = [PSCustomObject]@{ + + 'DirectoryName' = $CloudDirectory.Name + 'UserID' = $UserID + 'Status' = $Status + + } + $resultsArray += $FormattedResults + } else { + if ($GroupName) { + $GroupID = Get-JcSdkUserGroup -Filter "name:search:$GroupName" | Select-Object -ExpandProperty Id + if (!$GroupID) { + throw "Group does not exist. Run 'Get-JCGroup -type User' to see a list of all your JumpCloud user groups." + } + } + Set-JcSdkGSuiteAssociation -GsuiteId $CloudDirectory.Id -Op 'add' -Type 'user_group' -Id $GroupID -ErrorVariable addError -ErrorAction SilentlyContinue + if ($addError) { + $Status = $addError.ErrorDetails.Message + } else { + $Status = 'Added' + } + $FormattedResults = [PSCustomObject]@{ + + 'DirectoryName' = $CloudDirectory.Name + 'GroupID' = $GroupID + 'Status' = $Status + + } + $resultsArray += $FormattedResults + } + } + end { + return $resultsArray + } +} \ No newline at end of file diff --git a/PowerShell/JumpCloud Module/Public/Directory/Add-JCOffice365Member.ps1 b/PowerShell/JumpCloud Module/Public/Directory/Add-JCOffice365Member.ps1 new file mode 100644 index 000000000..22b16a7a3 --- /dev/null +++ b/PowerShell/JumpCloud Module/Public/Directory/Add-JCOffice365Member.ps1 @@ -0,0 +1,98 @@ +function Add-JCOffice365Member () { + param( + [Parameter( ValueFromPipelineByPropertyName, ParameterSetName = 'ByName', HelpMessage = 'The name of cloud directory instance')] + [String]$Name, + [Parameter( ValueFromPipelineByPropertyName, ParameterSetName = 'ByID', HelpMessage = 'The ID of cloud directory instance')] + [Alias('_id')] + [String]$ID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A username to add to the directory')] + [String]$Username, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserID to add to the directory')] + [String]$UserID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserGroup ID to add to the directory')] + [String]$GroupID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserGroup name to add to the directory')] + [String]$GroupName + ) + begin { + Write-Debug 'Verifying JCAPI Key' + if ($JCAPIKEY.length -ne 40) { + Connect-JCOnline + } + $resultsArray = [System.Collections.Generic.List[PSObject]]::new() + $DirectoryHash = Get-JcSdkDirectory | Where-Object type -EQ 'office_365' | Select-Object id, name + if (($Username -or $UserID) -and ($GroupID -or $GroupName)) { + throw "Please add one type of association per call" + } elseif ($Username -and $UserID) { + throw "Please use either a username or a userID" + } elseif ($GroupID -and $GroupName) { + throw "Please use either a UserGroup Name or a UserGroup ID" + } + } + process { + switch ($PSCmdlet.ParameterSetName) { + ByName { + Write-Debug "Finding directory by Name" + $CloudDirectory = $DirectoryHash | Where-Object name -EQ $Name + if (!$CloudDirectory) { + throw "$Name was not found. Please try again" + } elseif ($CloudDirectory.count -gt 1) { + throw "Multiple directories with the same name detected, please use the -id parameter to specify which directory to edit" + } + } + ByID { + Write-Debug "Finding directory by ID" + $CloudDirectory = $DirectoryHash | Where-Object Id -EQ $ID + if (!$CloudDirectory) { + throw "$ID was not found. Please try again" + } + } + } + if ($Username -or $UserID) { + if ($Username) { + $UserID = Get-JCUser -username $Username -returnProperties username | Select-Object -ExpandProperty _id + if (!$UserID) { + throw "Username: $Username was not found." + } + } + Set-JcSdkOffice365Association -Office365Id $CloudDirectory.Id -Op 'add' -Type 'user' -Id $UserID -ErrorVariable addError -ErrorAction SilentlyContinue + if ($addError) { + $Status = $addError.ErrorDetails.Message + } else { + $Status = 'Added' + } + $FormattedResults = [PSCustomObject]@{ + + 'DirectoryName' = $CloudDirectory.Name + 'UserID' = $UserID + 'Status' = $Status + + } + $resultsArray += $FormattedResults + } else { + if ($GroupName) { + $GroupID = Get-JcSdkUserGroup -Filter "name:search:$GroupName" | Select-Object -ExpandProperty Id + if (!$GroupID) { + throw "Group does not exist. Run 'Get-JCGroup -type User' to see a list of all your JumpCloud user groups." + } + } + Set-JcSdkOffice365Association -Office365Id $CloudDirectory.Id -Op 'add' -Type 'user_group' -Id $GroupID -ErrorVariable addError -ErrorAction SilentlyContinue + if ($addError) { + $Status = $addError.ErrorDetails.Message + } else { + $Status = 'Added' + } + $FormattedResults = [PSCustomObject]@{ + + 'DirectoryName' = $CloudDirectory.Name + 'GroupID' = $GroupID + 'Status' = $Status + + } + $resultsArray += $FormattedResults + } + } + end { + return $resultsArray + } +} \ No newline at end of file diff --git a/PowerShell/JumpCloud Module/Public/Directory/Remove-JCGsuiteMember.ps1 b/PowerShell/JumpCloud Module/Public/Directory/Remove-JCGsuiteMember.ps1 new file mode 100644 index 000000000..0a048642a --- /dev/null +++ b/PowerShell/JumpCloud Module/Public/Directory/Remove-JCGsuiteMember.ps1 @@ -0,0 +1,98 @@ +function Remove-JCGsuiteMember () { + param( + [Parameter( ValueFromPipelineByPropertyName, ParameterSetName = 'ByName', HelpMessage = 'The name of cloud directory instance')] + [String]$Name, + [Parameter( ValueFromPipelineByPropertyName, ParameterSetName = 'ByID', HelpMessage = 'The ID of cloud directory instance')] + [Alias('_id')] + [String]$ID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A username to remove to the directory')] + [String]$Username, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserID to remove to the directory')] + [String]$UserID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserGroup ID to remove to the directory')] + [String]$GroupID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserGroup name to remove to the directory')] + [String]$GroupName + ) + begin { + Write-Debug 'Verifying JCAPI Key' + if ($JCAPIKEY.length -ne 40) { + Connect-JCOnline + } + $resultsArray = [System.Collections.Generic.List[PSObject]]::new() + $DirectoryHash = Get-JcSdkDirectory | Where-Object type -EQ 'g_suite' | Select-Object id, name + if (($Username -or $UserID) -and ($GroupID -or $GroupName)) { + throw "Please use one type of association per call" + } elseif ($Username -and $UserID) { + throw "Please use either a username or a userID" + } elseif ($GroupID -and $GroupName) { + throw "Please use either a UserGroup Name or a UserGroup ID" + } + } + process { + switch ($PSCmdlet.ParameterSetName) { + ByName { + Write-Debug "Finding directory by Name" + $CloudDirectory = $DirectoryHash | Where-Object name -EQ $Name + if (!$CloudDirectory) { + throw "$Name was not found. Please try again" + } elseif ($CloudDirectory.count -gt 1) { + throw "Multiple directories with the same name detected, please use the -id parameter to specify which directory to edit" + } + } + ByID { + Write-Debug "Finding directory by ID" + $CloudDirectory = $DirectoryHash | Where-Object Id -EQ $ID + if (!$CloudDirectory) { + throw "$ID was not found. Please try again" + } + } + } + if ($Username -or $UserID) { + if ($Username) { + $UserID = Get-JCUser -username $Username -returnProperties username | Select-Object -ExpandProperty _id + if (!$UserID) { + throw "Username: $Username was not found." + } + } + Set-JcSdkGSuiteAssociation -GsuiteId $CloudDirectory.Id -Op 'remove' -Type 'user' -Id $UserID -ErrorVariable removeError -ErrorAction SilentlyContinue + if ($removeError) { + $Status = $removeError.ErrorDetails.Message + } else { + $Status = 'Removed' + } + $FormattedResults = [PSCustomObject]@{ + + 'DirectoryName' = $CloudDirectory.Name + 'UserID' = $UserID + 'Status' = $Status + + } + $resultsArray += $FormattedResults + } else { + if ($GroupName) { + $GroupID = Get-JcSdkUserGroup -Filter "name:search:$GroupName" | Select-Object -ExpandProperty Id + if (!$GroupID) { + throw "Group does not exist. Run 'Get-JCGroup -type User' to see a list of all your JumpCloud user groups." + } + } + Set-JcSdkGSuiteAssociation -GsuiteId $CloudDirectory.Id -Op 'remove' -Type 'user_group' -Id $GroupID -ErrorVariable removeError -ErrorAction SilentlyContinue + if ($removeError) { + $Status = $removeError.ErrorDetails.Message + } else { + $Status = 'Removed' + } + $FormattedResults = [PSCustomObject]@{ + + 'DirectoryName' = $CloudDirectory.Name + 'GroupID' = $GroupID + 'Status' = $Status + + } + $resultsArray += $FormattedResults + } + } + end { + return $resultsArray + } +} \ No newline at end of file diff --git a/PowerShell/JumpCloud Module/Public/Directory/Remove-JCOffice365Member.ps1 b/PowerShell/JumpCloud Module/Public/Directory/Remove-JCOffice365Member.ps1 new file mode 100644 index 000000000..5e17705f4 --- /dev/null +++ b/PowerShell/JumpCloud Module/Public/Directory/Remove-JCOffice365Member.ps1 @@ -0,0 +1,98 @@ +function Remove-JCOffice365Member () { + param( + [Parameter( ValueFromPipelineByPropertyName, ParameterSetName = 'ByName', HelpMessage = 'The name of cloud directory instance')] + [String]$Name, + [Parameter( ValueFromPipelineByPropertyName, ParameterSetName = 'ByID', HelpMessage = 'The ID of cloud directory instance')] + [Alias('_id')] + [String]$ID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A username to remove to the directory')] + [String]$Username, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserID to remove to the directory')] + [String]$UserID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserGroup ID to remove to the directory')] + [String]$GroupID, + [Parameter( ValueFromPipelineByPropertyName, HelpMessage = 'A UserGroup name to remove to the directory')] + [String]$GroupName + ) + begin { + Write-Debug 'Verifying JCAPI Key' + if ($JCAPIKEY.length -ne 40) { + Connect-JCOnline + } + $resultsArray = [System.Collections.Generic.List[PSObject]]::new() + $DirectoryHash = Get-JcSdkDirectory | Where-Object type -EQ 'office_365' | Select-Object id, name + if (($Username -or $UserID) -and ($GroupID -or $GroupName)) { + throw "Please use one type of association per call" + } elseif ($Username -and $UserID) { + throw "Please use either a username or a userID" + } elseif ($GroupID -and $GroupName) { + throw "Please use either a UserGroup Name or a UserGroup ID" + } + } + process { + switch ($PSCmdlet.ParameterSetName) { + ByName { + Write-Debug "Finding directory by Name" + $CloudDirectory = $DirectoryHash | Where-Object name -EQ $Name + if (!$CloudDirectory) { + throw "$Name was not found. Please try again" + } elseif ($CloudDirectory.count -gt 1) { + throw "Multiple directories with the same name detected, please use the -id parameter to specify which directory to edit" + } + } + ByID { + Write-Debug "Finding directory by ID" + $CloudDirectory = $DirectoryHash | Where-Object Id -EQ $ID + if (!$CloudDirectory) { + throw "$ID was not found. Please try again" + } + } + } + if ($Username -or $UserID) { + if ($Username) { + $UserID = Get-JCUser -username $Username -returnProperties username | Select-Object -ExpandProperty _id + if (!$UserID) { + throw "Username: $Username was not found." + } + } + Set-JcSdkOffice365Association -Office365Id $CloudDirectory.Id -Op 'remove' -Type 'user' -Id $UserID -ErrorVariable removeError -ErrorAction SilentlyContinue + if ($removeError) { + $Status = $removeError.ErrorDetails.Message + } else { + $Status = 'Removed' + } + $FormattedResults = [PSCustomObject]@{ + + 'DirectoryName' = $CloudDirectory.Name + 'UserID' = $UserID + 'Status' = $Status + + } + $resultsArray += $FormattedResults + } else { + if ($GroupName) { + $GroupID = Get-JcSdkUserGroup -Filter "name:search:$GroupName" | Select-Object -ExpandProperty Id + if (!$GroupID) { + throw "Group does not exist. Run 'Get-JCGroup -type User' to see a list of all your JumpCloud user groups." + } + } + Set-JcSdkOffice365Association -Office365Id $CloudDirectory.Id -Op 'remove' -Type 'user_group' -Id $GroupID -ErrorVariable removeError -ErrorAction SilentlyContinue + if ($removeError) { + $Status = $removeError.ErrorDetails.Message + } else { + $Status = 'Removed' + } + $FormattedResults = [PSCustomObject]@{ + + 'DirectoryName' = $CloudDirectory.Name + 'GroupID' = $GroupID + 'Status' = $Status + + } + $resultsArray += $FormattedResults + } + } + end { + return $resultsArray + } +} \ No newline at end of file diff --git a/PowerShell/JumpCloud Module/Tests/Public/Directory/Add-JCGsuiteMember.Tests.ps1 b/PowerShell/JumpCloud Module/Tests/Public/Directory/Add-JCGsuiteMember.Tests.ps1 new file mode 100644 index 000000000..0b77bce37 --- /dev/null +++ b/PowerShell/JumpCloud Module/Tests/Public/Directory/Add-JCGsuiteMember.Tests.ps1 @@ -0,0 +1,83 @@ +Describe -Tag:('JCCloudDirectory') 'Add-JCGSuiteMember' { + BeforeAll { + $Directories = Get-JCCloudDirectory -Type g_suite + + $NewUser = New-RandomUser -domain "delCloudDirUser.$(New-RandomString -NumberOfChars 5)" | New-JCUser + $NewGroup = New-JCUserGroup -GroupName 'CloudDirTestAddGSuite' + } + It 'Adds a user by username with directory id' { + $User = Add-JCGSuiteMember -Id $Directories.Id -Username $NewUser.username + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a user by username with directory name' { + $User = Add-JCGSuiteMember -Name $Directories.Name -Username $NewUser.username + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a user by userID with directory id' { + $User = Add-JCGSuiteMember -Id $Directories.Id -UserID $NewUser.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a user by userID with directory name' { + $User = Add-JCGSuiteMember -Name $Directories.Name -UserID $NewUser.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a userGroup by Name with directory id' { + $User = Add-JCGSuiteMember -Id $Directories.Id -GroupName $NewGroup.Name + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a userGroup by Name with directory Name' { + $User = Add-JCGSuiteMember -Name $Directories.Name -GroupName $NewGroup.Name + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a userGroup by ID with directory id' { + $User = Add-JCGSuiteMember -Id $Directories.Id -GroupID $NewGroup.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a userGroup by ID with directory Name' { + $User = Add-JCGSuiteMember -Name $Directories.Name -GroupID $NewGroup.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Added' + } + It 'Attempts to add user by username and userid' { + {Add-JCGsuiteMember -Name $Directories.Name -Username $NewUser.username -userID $NewUser.ID} | Should -Throw + } + It 'Attempts to add userGroup by name and ID' { + {Add-JCGsuiteMember -Name $Directories.Name -GroupID $NewGroup.ID -GroupName $NewGroup.Name} | Should -Throw + } + It 'Attempts to add a user and a usergroup' { + {Add-JCGsuiteMember -Name $Directories.Name -GroupID $NewGroup.ID -UserID $NewUser.ID} | Should -Throw + } + It 'Attempts to add a non-existent user' { + { $User = Add-JCGsuiteMember -Name $Directories.Name -Username "Dummy.User" } | Should -Throw + $User = Add-JCGsuiteMember -Name $Directories.Name -UserID 123456 + $User.Status | Should -BeLike 'Bad Request*' + } + It 'Attempts to add a non-existent group' { + { $Group = Add-JCGsuiteMember -Name $Directories.Name -GroupName 'Dummy Group' } | Should -Throw + $Group = Add-JCGsuiteMember -Name $Directories.Name -GroupID 123456 + $Group.Status | Should -BeLike 'Bad Request*' + } + AfterEach { + Set-JcSdkGSuiteAssociation -GsuiteId $Directories.Id -Id $NewUser.Id -Type user -Op 'remove' -ErrorAction SilentlyContinue + Set-JcSdkGSuiteAssociation -GsuiteId $Directories.Id -Id $NewGroup.Id -Type user_group -Op 'remove' -ErrorAction SilentlyContinue + } + AfterAll { + Remove-JCUser -UserID $NewUser.Id -force + Remove-JCUserGroup -GroupID $NewGroup.Id -force + } +} \ No newline at end of file diff --git a/PowerShell/JumpCloud Module/Tests/Public/Directory/Add-JCOffice365Member.Tests.ps1 b/PowerShell/JumpCloud Module/Tests/Public/Directory/Add-JCOffice365Member.Tests.ps1 new file mode 100644 index 000000000..3491bea46 --- /dev/null +++ b/PowerShell/JumpCloud Module/Tests/Public/Directory/Add-JCOffice365Member.Tests.ps1 @@ -0,0 +1,83 @@ +Describe -Tag:('JCCloudDirectory') 'Add-JCOffice365Member' { + BeforeAll { + $Directories = Get-JCCloudDirectory -Type office_365 + + $NewUser = New-RandomUser -domain "delCloudDirUser.$(New-RandomString -NumberOfChars 5)" | New-JCUser + $NewGroup = New-JCUserGroup -GroupName 'CloudDirTestAddO365' + } + It 'Adds a user by username with directory id' { + $User = Add-JCOffice365Member -Id $Directories.Id -Username $NewUser.username + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a user by username with directory name' { + $User = Add-JCOffice365Member -Name $Directories.Name -Username $NewUser.username + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a user by userID with directory id' { + $User = Add-JCOffice365Member -Id $Directories.Id -UserID $NewUser.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a user by userID with directory name' { + $User = Add-JCOffice365Member -Name $Directories.Name -UserID $NewUser.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a userGroup by Name with directory id' { + $User = Add-JCOffice365Member -Id $Directories.Id -GroupName $NewGroup.Name + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a userGroup by Name with directory Name' { + $User = Add-JCOffice365Member -Name $Directories.Name -GroupName $NewGroup.Name + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a userGroup by ID with directory id' { + $User = Add-JCOffice365Member -Id $Directories.Id -GroupID $NewGroup.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Added' + } + It 'Adds a userGroup by ID with directory Name' { + $User = Add-JCOffice365Member -Name $Directories.Name -GroupID $NewGroup.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Added' + } + It 'Attempts to add user by username and userid' { + {Add-JCOffice365Member -Name $Directories.Name -Username $NewUser.username -userID $NewUser.ID} | Should -Throw + } + It 'Attempts to add userGroup by name and ID' { + {Add-JCOffice365Member -Name $Directories.Name -GroupID $NewGroup.ID -GroupName $NewGroup.Name} | Should -Throw + } + It 'Attempts to add a user and a usergroup' { + {Add-JCOffice365Member -Name $Directories.Name -GroupID $NewGroup.ID -UserID $NewUser.ID} | Should -Throw + } + It 'Attempts to add a non-existent user' { + { $User = Add-JCOffice365Member -Name $Directories.Name -Username "Dummy.User" } | Should -Throw + $User = Add-JCOffice365Member -Name $Directories.Name -UserID 123456 + $User.Status | Should -BeLike 'Bad Request*' + } + It 'Attempts to add a non-existent group' { + { $Group = Add-JCOffice365Member -Name $Directories.Name -GroupName 'Dummy Group' } | Should -Throw + $Group = Add-JCOffice365Member -Name $Directories.Name -GroupID 123456 + $Group.Status | Should -BeLike 'Bad Request*' + } + AfterEach { + Set-JcSdkOffice365Association -Office365Id $Directories.Id -Id $NewUser.Id -Type user -Op 'remove' -ErrorAction SilentlyContinue + Set-JcSdkOffice365Association -Office365Id $Directories.Id -Id $NewGroup.Id -Type user_group -Op 'remove' -ErrorAction SilentlyContinue + } + AfterAll { + Remove-JCUser -UserID $NewUser.Id -force + Remove-JCUserGroup -GroupID $NewGroup.Id -force + } +} \ No newline at end of file diff --git a/PowerShell/JumpCloud Module/Tests/Public/Directory/Remove-JCGsuiteMember.Tests.ps1 b/PowerShell/JumpCloud Module/Tests/Public/Directory/Remove-JCGsuiteMember.Tests.ps1 new file mode 100644 index 000000000..666a113f0 --- /dev/null +++ b/PowerShell/JumpCloud Module/Tests/Public/Directory/Remove-JCGsuiteMember.Tests.ps1 @@ -0,0 +1,86 @@ +Describe -Tag:('JCCloudDirectory') 'Remove-JCGsuiteMember' { + BeforeAll { + $Directories = Get-JCCloudDirectory -Type g_suite + + $NewUser = New-RandomUser -domain "delCloudDirUser.$(New-RandomString -NumberOfChars 5)" | New-JCUser + $NewGroup = New-JCUserGroup -GroupName 'CloudDirTestRemoveGsuite' + + Set-JcSdkGSuiteAssociation -GsuiteId $Directories.Id -Id $NewUser.Id -Type user -Op 'add' + Set-JcSdkGSuiteAssociation -GsuiteId $Directories.Id -Id $NewGroup.Id -Type user_group -Op 'add' + } + It 'Removes a user by username with directory id' { + $User = Remove-JCGsuiteMember -Id $Directories.Id -Username $NewUser.username + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a user by username with directory name' { + $User = Remove-JCGsuiteMember -Name $Directories.Name -Username $NewUser.username + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a user by userID with directory id' { + $User = Remove-JCGsuiteMember -Id $Directories.Id -UserID $NewUser.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a user by userID with directory name' { + $User = Remove-JCGsuiteMember -Name $Directories.Name -UserID $NewUser.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a userGroup by Name with directory id' { + $User = Remove-JCGsuiteMember -Id $Directories.Id -GroupName $NewGroup.Name + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a userGroup by Name with directory Name' { + $User = Remove-JCGsuiteMember -Name $Directories.Name -GroupName $NewGroup.Name + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a userGroup by ID with directory id' { + $User = Remove-JCGsuiteMember -Id $Directories.Id -GroupID $NewGroup.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a userGroup by ID with directory Name' { + $User = Remove-JCGsuiteMember -Name $Directories.Name -GroupID $NewGroup.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Removed' + } + It 'Attempts to remove user by username and userid' { + {Remove-JCGsuiteMember -Name $Directories.Name -Username $NewUser.username -userID $NewUser.ID} | Should -Throw + } + It 'Attempts to remove userGroup by name and ID' { + {Remove-JCGsuiteMember -Name $Directories.Name -GroupID $NewGroup.ID -GroupName $NewGroup.Name} | Should -Throw + } + It 'Attempts to remove a user and a usergroup' { + {Remove-JCGsuiteMember -Name $Directories.Name -GroupID $NewGroup.ID -UserID $NewUser.ID} | Should -Throw + } + It 'Attempts to remove a non-existent user' { + { $User = Remove-JCGsuiteMember -Name $Directories.Name -Username "Dummy.User" } | Should -Throw + $User = Remove-JCGsuiteMember -Name $Directories.Name -UserID 123456 + $User.Status | Should -BeLike 'Bad Request*' + } + It 'Attempts to remove a non-existent group' { + { $Group = Remove-JCGsuiteMember -Name $Directories.Name -GroupName 'Dummy Group' } | Should -Throw + $Group = Remove-JCGsuiteMember -Name $Directories.Name -GroupID 123456 + $Group.Status | Should -BeLike 'Bad Request*' + } + AfterEach { + Set-JcSdkGSuiteAssociation -GsuiteId $Directories.Id -Id $NewUser.Id -Type user -Op 'add' -ErrorAction SilentlyContinue + Set-JcSdkGSuiteAssociation -GsuiteId $Directories.Id -Id $NewGroup.Id -Type user_group -Op 'add' -ErrorAction SilentlyContinue + } + AfterAll { + Remove-JCUser -UserID $NewUser.Id -force + Remove-JCUserGroup -GroupID $NewGroup.Id -force + } +} \ No newline at end of file diff --git a/PowerShell/JumpCloud Module/Tests/Public/Directory/Remove-JCOffice365Member.Tests.ps1 b/PowerShell/JumpCloud Module/Tests/Public/Directory/Remove-JCOffice365Member.Tests.ps1 new file mode 100644 index 000000000..78dc60fe7 --- /dev/null +++ b/PowerShell/JumpCloud Module/Tests/Public/Directory/Remove-JCOffice365Member.Tests.ps1 @@ -0,0 +1,86 @@ +Describe -Tag:('JCCloudDirectory') 'Remove-JCOffice365Member' { + BeforeAll { + $Directories = Get-JCCloudDirectory -Type office_365 + + $NewUser = New-RandomUser -domain "delCloudDirUser.$(New-RandomString -NumberOfChars 5)" | New-JCUser + $NewGroup = New-JCUserGroup -GroupName 'CloudDirTestRemoveO365' + + Set-JcSdkOffice365Association -Office365Id $Directories.Id -Id $NewUser.Id -Type user -Op 'add' + Set-JcSdkOffice365Association -Office365Id $Directories.Id -Id $NewGroup.Id -Type user_group -Op 'add' + } + It 'Removes a user by username with directory id' { + $User = Remove-JCOffice365Member -Id $Directories.Id -Username $NewUser.username + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a user by username with directory name' { + $User = Remove-JCOffice365Member -Name $Directories.Name -Username $NewUser.username + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a user by userID with directory id' { + $User = Remove-JCOffice365Member -Id $Directories.Id -UserID $NewUser.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a user by userID with directory name' { + $User = Remove-JCOffice365Member -Name $Directories.Name -UserID $NewUser.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.UserID | Should -Be $NewUser.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a userGroup by Name with directory id' { + $User = Remove-JCOffice365Member -Id $Directories.Id -GroupName $NewGroup.Name + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a userGroup by Name with directory Name' { + $User = Remove-JCOffice365Member -Name $Directories.Name -GroupName $NewGroup.Name + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a userGroup by ID with directory id' { + $User = Remove-JCOffice365Member -Id $Directories.Id -GroupID $NewGroup.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Removed' + } + It 'Removes a userGroup by ID with directory Name' { + $User = Remove-JCOffice365Member -Name $Directories.Name -GroupID $NewGroup.Id + $User.DirectoryName | Should -Be $Directories.Name + $User.GroupID | Should -Be $NewGroup.ID + $User.Status | Should -Be 'Removed' + } + It 'Attempts to remove user by username and userid' { + {Remove-JCOffice365Member -Name $Directories.Name -Username $NewUser.username -userID $NewUser.ID} | Should -Throw + } + It 'Attempts to remove userGroup by name and ID' { + {Remove-JCOffice365Member -Name $Directories.Name -GroupID $NewGroup.ID -GroupName $NewGroup.Name} | Should -Throw + } + It 'Attempts to remove a user and a usergroup' { + {Remove-JCOffice365Member -Name $Directories.Name -GroupID $NewGroup.ID -UserID $NewUser.ID} | Should -Throw + } + It 'Attempts to remove a non-existent user' { + { $User = Remove-JCOffice365Member -Name $Directories.Name -Username "Dummy.User" } | Should -Throw + $User = Remove-JCOffice365Member -Name $Directories.Name -UserID 123456 + $User.Status | Should -BeLike 'Bad Request*' + } + It 'Attempts to remove a non-existent group' { + { $Group = Remove-JCOffice365Member -Name $Directories.Name -GroupName 'Dummy Group' } | Should -Throw + $Group = Remove-JCOffice365Member -Name $Directories.Name -GroupID 123456 + $Group.Status | Should -BeLike 'Bad Request*' + } + AfterEach { + Set-JcSdkOffice365Association -Office365Id $Directories.Id -Id $NewUser.Id -Type user -Op 'add' -ErrorAction SilentlyContinue + Set-JcSdkOffice365Association -Office365Id $Directories.Id -Id $NewGroup.Id -Type user_group -Op 'add' -ErrorAction SilentlyContinue + } + AfterAll { + Remove-JCUser -UserID $NewUser.Id -force + Remove-JCUserGroup -GroupID $NewGroup.Id -force + } +} \ No newline at end of file diff --git a/PowerShell/JumpCloud Module/en-Us/JumpCloud-help.xml b/PowerShell/JumpCloud Module/en-Us/JumpCloud-help.xml index 61b3b37c7..517c9c8fe 100644 --- a/PowerShell/JumpCloud Module/en-Us/JumpCloud-help.xml +++ b/PowerShell/JumpCloud Module/en-Us/JumpCloud-help.xml @@ -618,23 +618,35 @@ - Add-JCRadiusReplyAttribute + Add-JCGsuiteMember Add - JCRadiusReplyAttribute + JCGsuiteMember - Adds Radius reply attributes to a JumpCloud user group. + {{ Fill in the Synopsis }} - Adds Radius reply attributes to a JumpCloud user group. Any RADIUS reply attributes configured on a JumpCloud user group which associates a user to a RADIUS server will be returned in the Access-Accept message sent to the endpoint configured to authenticate with JumpCloud Radius. If a user is a member of more then one JumpCloud user group associated with a given RADIUS server all Reply attributes for the groups that associate the user to the RADIUS server will be returned in the Access-Accept message. If a user is a member of more then one JumpCloud user group associated with a given RADIUS server and these groups are configured with conflicting RADIUS reply attributes then the values of the attributes for the group that was created most recently will be returned in the Access-Accept message. RADIUS reply attribute conflicts are resolved based on the creation date of the user group where groups that are created more recently take precedent over older groups. Conflicts occur when groups are configured with the same RADIUS reply attributes and have conflicting attribute values. RADIUS reply attributes with the same attribute names but different tag values do not create conflicts. + {{ Fill in the Description }} - Add-JCRadiusReplyAttribute - + Add-JCGsuiteMember + + GroupID + + A UserGroup ID to add to the directory + + System.String + + System.String + + + None + + GroupName - The JumpCloud user group to add the specified Radius reply attributes to. + A UserGroup name to add to the directory System.String @@ -643,10 +655,10 @@ None - - Attribute1_name + + ID - Enter an attribute name + The ID of cloud directory instance System.String @@ -655,10 +667,10 @@ None - - Attribute1_value + + UserID - Enter an attribute value + A UserID to add to the directory System.String @@ -667,10 +679,10 @@ None - - Attribute2_name + + Username - Enter an attribute name + A username to add to the directory System.String @@ -679,10 +691,13 @@ None - - Attribute2_value + + + Add-JCGsuiteMember + + GroupID - Enter an attribute value + A UserGroup ID to add to the directory System.String @@ -692,27 +707,21 @@ None - NumberOfAttributes + GroupName - The number of RADIUS reply attributes you wish to add to a user group. If an attributes exists with a name that matches the new attribute then the existing attribute will be updated. Based on the NumberOfAttributes value two Dynamic Parameters will be created for each Attribute: Attribute_name and Attribute_value with an associated number. See an example for working with Custom Attribute in EXAMPLE 3 above. Attributes must be valid RADIUS attributes. Find a list of valid RADIUS attributes within the dictionary files of this repro broken down by vendor: github.com/FreeRADIUS/freeradius-server/tree/v3.0.x/share If an invalid attribute is configured on a user group this will prevent users within this group from being able to authenticate via RADIUS until the invalid attribute is removed. + A UserGroup name to add to the directory - System.Int32 + System.String - System.Int32 + System.String None - VLAN + Name - By specifying the '-VLAN' parameter three radius attributes are added to the target user group. - These attributes and values are are: - name value - ---- ----- - Tunnel-Medium-Type IEEE-802 - Tunnel-Type VLAN - Tunnel-Private-Group-Id VALUE of -VLAN The value specified for the '-VLAN' parameter is populated for the value of Tunnel-Private-Group-Id . + The name of cloud directory instance System.String @@ -722,43 +731,22 @@ None - VLANTag + UserID - Specifies the VLAN id which is applied to all attribute names. + A UserID to add to the directory + + System.String + + System.String + + + None + + + Username + + A username to add to the directory - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - System.String System.String @@ -769,22 +757,10 @@ - - Attribute1_name - - Enter an attribute name - - System.String - - System.String - - - None - - - Attribute1_value + + GroupID - Enter an attribute value + A UserGroup ID to add to the directory System.String @@ -793,10 +769,10 @@ None - - Attribute2_name + + GroupName - Enter an attribute name + A UserGroup name to add to the directory System.String @@ -805,10 +781,10 @@ None - - Attribute2_value + + ID - Enter an attribute value + The ID of cloud directory instance System.String @@ -817,10 +793,10 @@ None - - GroupName + + Name - The JumpCloud user group to add the specified Radius reply attributes to. + The name of cloud directory instance System.String @@ -830,27 +806,9 @@ None - NumberOfAttributes - - The number of RADIUS reply attributes you wish to add to a user group. If an attributes exists with a name that matches the new attribute then the existing attribute will be updated. Based on the NumberOfAttributes value two Dynamic Parameters will be created for each Attribute: Attribute_name and Attribute_value with an associated number. See an example for working with Custom Attribute in EXAMPLE 3 above. Attributes must be valid RADIUS attributes. Find a list of valid RADIUS attributes within the dictionary files of this repro broken down by vendor: github.com/FreeRADIUS/freeradius-server/tree/v3.0.x/share If an invalid attribute is configured on a user group this will prevent users within this group from being able to authenticate via RADIUS until the invalid attribute is removed. - - System.Int32 - - System.Int32 - - - None - - - VLAN + UserID - By specifying the '-VLAN' parameter three radius attributes are added to the target user group. - These attributes and values are are: - name value - ---- ----- - Tunnel-Medium-Type IEEE-802 - Tunnel-Type VLAN - Tunnel-Private-Group-Id VALUE of -VLAN The value specified for the '-VLAN' parameter is populated for the value of Tunnel-Private-Group-Id . + A UserID to add to the directory System.String @@ -860,9 +818,9 @@ None - VLANTag + Username - Specifies the VLAN id which is applied to all attribute names. + A username to add to the directory System.String @@ -881,14 +839,6 @@ - - - System.Int32 - - - - - @@ -908,59 +858,50 @@ -------------------------- Example 1 -------------------------- - Add-JCRadiusReplyAttribute -GroupName "BoulderOffice" -VLAN 24 - - By specifying the '-VLAN' parameter three radius attributes are added to the JumpCloud user group 'BoulderOffice'. The value specified for the '-VLAN' parameter is populated for the value of Tunnel-Private-Group-Id . - - - - -------------------------- Example 2 -------------------------- - Add-JCRadiusReplyAttribute -GroupName "BoulderOffice" -VLAN 24 -VLANTag 3 - - By specifying the '-VLAN' parameter three radius attributes are added to the JumpCloud user group 'BoulderOffice'. The use of '-VLANTag' appends each VLAN attribute name with a colon and the tag number specified. - - - - -------------------------- Example 3 -------------------------- - Add-JCRadiusReplyAttribute -GroupName "BoulderOffice" -NumberOfAttributes 2 -Attribute1_name "Session-Timeout" -Attribute1_value 100 -Attribute2_name "Termination-Action" -Attribute2_value 1 - - Adds two Radius attributes to the JumpCloud user group 'BoulderOffice'. The parameter '-NumberOfAttributes' is a dynamic parameter that generates two required parameters for each custom attribute specified. In this example these parameters are -Attribute1_name,-Attribute1_value, -Attribute2_name and -Attribute2_value. - - - - -------------------------- Example 4 -------------------------- - Add-JCRadiusReplyAttribute -GroupName "BoulderOffice" -VLAN 24 -NumberOfAttributes 2 -Attribute1_name "Session-Timeout" -Attribute1_value 100 -Attribute2_name "Termination-Action" -Attribute2_value 1 + PS C:\> {{ Add example code here }} - Adds five Radius reply attributes to the JumpCloud User group 'BoulderUsers'. By specifying the '-VLAN' parameter three radius attributes are added to the JumpCloud user group 'BoulderOffice'. The value specified for the '-VLAN' parameter is populated for the value of Tunnel-Private-Group-Id .The parameter '-NumberOfAttributes' is a dynamic parameter that generates two required parameters for each custom attribute specified. In this example these parameters are -Attribute1_name,-Attribute1_value, -Attribute2_name and -Attribute2_value. + {{ Add example description here }} Online Version: - https://github.com/TheJumpCloud/support/wiki/Add-JCRadiusReplyAttribute + https://github.com/TheJumpCloud/support/wiki/ - Add-JCSystemGroupMember + Add-JCOffice365Member Add - JCSystemGroupMember + JCOffice365Member - Adds a JumpCloud System to a JumpCloud System Group + {{ Fill in the Synopsis }} - The Add-JCSystemGroupMember function is used to add a JumpCloud System to a JumpCloud System Group. The new System Group member must be added by the SystemID parameter. + {{ Fill in the Description }} - Add-JCSystemGroupMember - + Add-JCOffice365Member + + GroupID + + A UserGroup ID to add to the directory + + System.String + + System.String + + + None + + GroupName - The name of the JumpCloud System Group that you want to add the System to. + A UserGroup name to add to the directory System.String @@ -969,21 +910,22 @@ None - - ByID + + ID - Use the -ByID parameter when the GroupID and SystemID are both being passed over the pipeline to the Add-JCSystemGroupMember function. The -ByID SwitchParameter will set the ParameterSet to "ByID" which will increase the function speed and performance. + The ID of cloud directory instance + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - GroupID + UserID - The GroupID is used in the ParameterSet 'ByID'. The GroupID for a System Group can be found by running the command: + A UserID to add to the directory System.String @@ -992,14 +934,10 @@ None - - SystemID + + Username - The _id of the System which you want to add to the System Group. - To find a JumpCloud SystemID run the command: - PS C:\> Get-JCSystem | Select hostname, _id - The SystemID will be the 24 character string populated for the _id field. - SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCSystem function before calling Add-JCSystemGroupMember. This is shown in EXAMPLES 2, 3, and 4. + A username to add to the directory System.String @@ -1010,11 +948,11 @@ - Add-JCSystemGroupMember - - GroupName + Add-JCOffice365Member + + GroupID - The name of the JumpCloud System Group that you want to add the System to. + A UserGroup ID to add to the directory System.String @@ -1023,14 +961,10 @@ None - - SystemID + + GroupName - The _id of the System which you want to add to the System Group. - To find a JumpCloud SystemID run the command: - PS C:\> Get-JCSystem | Select hostname, _id - The SystemID will be the 24 character string populated for the _id field. - SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCSystem function before calling Add-JCSystemGroupMember. This is shown in EXAMPLES 2, 3, and 4. + A UserGroup name to add to the directory System.String @@ -1039,25 +973,61 @@ None - - + + Name + + The name of cloud directory instance + + System.String + + System.String + + + None + + + UserID + + A UserID to add to the directory + + System.String + + System.String + + + None + + + Username + + A username to add to the directory + + System.String + + System.String + + + None + + + - - ByID + + GroupID - Use the -ByID parameter when the GroupID and SystemID are both being passed over the pipeline to the Add-JCSystemGroupMember function. The -ByID SwitchParameter will set the ParameterSet to "ByID" which will increase the function speed and performance. + A UserGroup ID to add to the directory - System.Management.Automation.SwitchParameter + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - GroupID + GroupName - The GroupID is used in the ParameterSet 'ByID'. The GroupID for a System Group can be found by running the command: + A UserGroup name to add to the directory System.String @@ -1066,10 +1036,10 @@ None - - GroupName + + ID - The name of the JumpCloud System Group that you want to add the System to. + The ID of cloud directory instance System.String @@ -1078,14 +1048,34 @@ None - - SystemID + + Name - The _id of the System which you want to add to the System Group. - To find a JumpCloud SystemID run the command: - PS C:\> Get-JCSystem | Select hostname, _id - The SystemID will be the 24 character string populated for the _id field. - SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCSystem function before calling Add-JCSystemGroupMember. This is shown in EXAMPLES 2, 3, and 4. + The name of cloud directory instance + + System.String + + System.String + + + None + + + UserID + + A UserID to add to the directory + + System.String + + System.String + + + None + + + Username + + A username to add to the directory System.String @@ -1123,75 +1113,50 @@ -------------------------- Example 1 -------------------------- - PS C:\> Add-JCSystemGroupMember -GroupName 'Windows Systems' -SystemID '59dad305383roc7k369sf7s2' - - Adds a System with SystemID '59dad305383roc7k369sf7s2' to the System Group 'Windows Systems' - - - - -------------------------- Example 2 -------------------------- - PS C:\> Get-JCSystem | Where-Object os -Like *Mac* | Add-JCSystemGroupMember -GroupName 'Mac Systems' + PS C:\> {{ Add example code here }} - Adds all Systems with an operating system like 'Mac' to the System Group 'Mac Systems' - - - - -------------------------- Example 3 -------------------------- - Get-JCSystem | Where-Object active -EQ $true | Add-JCSystemGroupMember -GroupName 'Active Systems' - - Adds all active systems to the System Group 'Active Systems' - - - - -------------------------- Example 4 -------------------------- - Get-JCSystem | Where-Object {$_.active -EQ $true -and $_.os -like '*Mac*'} | Add-JCSystemGroupMember 'Active Mac Systems' - - Adds all active systems with an operating system like 'Mac' to the System Group 'Active Mac Systems' + {{ Add example description here }} Online Version: - https://github.com/TheJumpCloud/support/wiki/Add-JCSystemGroupMember + https://github.com/TheJumpCloud/support/wiki/ - Add-JCSystemUser + Add-JCRadiusReplyAttribute Add - JCSystemUser + JCRadiusReplyAttribute - Associates a JumpCloud User account with a local account on a JumpCloud managed System. + Adds Radius reply attributes to a JumpCloud user group. - The Add-JCSystemUser function allows you to bind a JumpCloud user to a JumpCloud system and set the user pemissions. When binding a user to a system the JumpCloud agent can complete one of two actions on the target system. 1. If there is an existing local user account on the target system with a Username that matches identically with the Username of the newly bound user then the JumpCloud agent will take over and manage the password of the existing local account. 1. If there is not an existing local user account on the target system with a Username that matches identically with the Username of the newly bound user then the JumpCloud agent will create a new account on the system with the Username of the newly bound user. + Adds Radius reply attributes to a JumpCloud user group. Any RADIUS reply attributes configured on a JumpCloud user group which associates a user to a RADIUS server will be returned in the Access-Accept message sent to the endpoint configured to authenticate with JumpCloud Radius. If a user is a member of more then one JumpCloud user group associated with a given RADIUS server all Reply attributes for the groups that associate the user to the RADIUS server will be returned in the Access-Accept message. If a user is a member of more then one JumpCloud user group associated with a given RADIUS server and these groups are configured with conflicting RADIUS reply attributes then the values of the attributes for the group that was created most recently will be returned in the Access-Accept message. RADIUS reply attribute conflicts are resolved based on the creation date of the user group where groups that are created more recently take precedent over older groups. Conflicts occur when groups are configured with the same RADIUS reply attributes and have conflicting attribute values. RADIUS reply attributes with the same attribute names but different tag values do not create conflicts. - Add-JCSystemUser - - Administrator + Add-JCRadiusReplyAttribute + + GroupName - A boolean $true/$false value to set Administrator permissions on the target JumpCloud system + The JumpCloud user group to add the specified Radius reply attributes to. - System.Boolean + System.String - System.Boolean + System.String None - - SystemID + + Attribute1_name - The _id of the System which you want to bind the JumpCloud user to. - To find a JumpCloud SystemID run the command: - PS C:\> Get-JCSystem | Select hostname, _id - The SystemID will be the 24 character string populated for the _id field. - SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically by calling a JumpCloud function that returns the SystemID. + Enter an attribute name System.String @@ -1201,13 +1166,9 @@ None - UserID + Attribute1_value - The _id of the User which you want to add to the JumpCloud system. - To find a JumpCloud UserID run the command: - PS C:\> Get-JCUser | Select username, _id - The UserID will be the 24 character string populated for the _id field. - UserID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud UserID. This is shown in EXAMPLES 2, 3, and 4. + Enter an attribute value System.String @@ -1216,13 +1177,22 @@ None - - - Add-JCSystemUser - - Username + + Attribute2_name - The Username of the JumpCloud user you wish to add to the JumpCloud system. + Enter an attribute name + + System.String + + System.String + + + None + + + Attribute2_value + + Enter an attribute value System.String @@ -1232,26 +1202,73 @@ None - Administrator + NumberOfAttributes - A boolean $true/$false value to set Administrator permissions on the target JumpCloud system + The number of RADIUS reply attributes you wish to add to a user group. If an attributes exists with a name that matches the new attribute then the existing attribute will be updated. Based on the NumberOfAttributes value two Dynamic Parameters will be created for each Attribute: Attribute_name and Attribute_value with an associated number. See an example for working with Custom Attribute in EXAMPLE 3 above. Attributes must be valid RADIUS attributes. Find a list of valid RADIUS attributes within the dictionary files of this repro broken down by vendor: github.com/FreeRADIUS/freeradius-server/tree/v3.0.x/share If an invalid attribute is configured on a user group this will prevent users within this group from being able to authenticate via RADIUS until the invalid attribute is removed. - System.Boolean + System.Int32 - System.Boolean + System.Int32 None - - SystemID + + VLAN - The _id of the System which you want to bind the JumpCloud user to. - To find a JumpCloud SystemID run the command: - PS C:\> Get-JCSystem | Select hostname, _id - The SystemID will be the 24 character string populated for the _id field. - SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically by calling a JumpCloud function that returns the SystemID. + By specifying the '-VLAN' parameter three radius attributes are added to the target user group. + These attributes and values are are: + name value + ---- ----- + Tunnel-Medium-Type IEEE-802 + Tunnel-Type VLAN + Tunnel-Private-Group-Id VALUE of -VLAN The value specified for the '-VLAN' parameter is populated for the value of Tunnel-Private-Group-Id . + + System.String + + System.String + + + None + + + VLANTag + + Specifies the VLAN id which is applied to all attribute names. + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + System.String System.String @@ -1262,26 +1279,22 @@ - - Administrator + + Attribute1_name - A boolean $true/$false value to set Administrator permissions on the target JumpCloud system + Enter an attribute name - System.Boolean + System.String - System.Boolean + System.String None - - SystemID + + Attribute1_value - The _id of the System which you want to bind the JumpCloud user to. - To find a JumpCloud SystemID run the command: - PS C:\> Get-JCSystem | Select hostname, _id - The SystemID will be the 24 character string populated for the _id field. - SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically by calling a JumpCloud function that returns the SystemID. + Enter an attribute value System.String @@ -1291,13 +1304,9 @@ None - UserID + Attribute2_name - The _id of the User which you want to add to the JumpCloud system. - To find a JumpCloud UserID run the command: - PS C:\> Get-JCUser | Select username, _id - The UserID will be the 24 character string populated for the _id field. - UserID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud UserID. This is shown in EXAMPLES 2, 3, and 4. + Enter an attribute name System.String @@ -1306,10 +1315,64 @@ None - - Username + + Attribute2_value - The Username of the JumpCloud user you wish to add to the JumpCloud system. + Enter an attribute value + + System.String + + System.String + + + None + + + GroupName + + The JumpCloud user group to add the specified Radius reply attributes to. + + System.String + + System.String + + + None + + + NumberOfAttributes + + The number of RADIUS reply attributes you wish to add to a user group. If an attributes exists with a name that matches the new attribute then the existing attribute will be updated. Based on the NumberOfAttributes value two Dynamic Parameters will be created for each Attribute: Attribute_name and Attribute_value with an associated number. See an example for working with Custom Attribute in EXAMPLE 3 above. Attributes must be valid RADIUS attributes. Find a list of valid RADIUS attributes within the dictionary files of this repro broken down by vendor: github.com/FreeRADIUS/freeradius-server/tree/v3.0.x/share If an invalid attribute is configured on a user group this will prevent users within this group from being able to authenticate via RADIUS until the invalid attribute is removed. + + System.Int32 + + System.Int32 + + + None + + + VLAN + + By specifying the '-VLAN' parameter three radius attributes are added to the target user group. + These attributes and values are are: + name value + ---- ----- + Tunnel-Medium-Type IEEE-802 + Tunnel-Type VLAN + Tunnel-Private-Group-Id VALUE of -VLAN The value specified for the '-VLAN' parameter is populated for the value of Tunnel-Private-Group-Id . + + System.String + + System.String + + + None + + + VLANTag + + Specifies the VLAN id which is applied to all attribute names. System.String @@ -1330,7 +1393,7 @@ - System.Boolean + System.Int32 @@ -1355,52 +1418,59 @@ -------------------------- Example 1 -------------------------- - PS C:\> Add-JCSystemUser -Username cclemons -SystemID 5a0795nnie7127f4ev2erb154a -Administrator $True + Add-JCRadiusReplyAttribute -GroupName "BoulderOffice" -VLAN 24 - Adds the JumpCloud user with the Username 'cclemons' to the System with a SystemID of '5a0795nnie7127f4ev2erb154a' and grants administrator permission + By specifying the '-VLAN' parameter three radius attributes are added to the JumpCloud user group 'BoulderOffice'. The value specified for the '-VLAN' parameter is populated for the value of Tunnel-Private-Group-Id . -------------------------- Example 2 -------------------------- - PS C:\> Get-JCSystemUser -SystemID 5a0795nnie7127f4ev2erb154a | Add-JCSystemUser -SystemID 59f2c305383cba7e369df7c2 + Add-JCRadiusReplyAttribute -GroupName "BoulderOffice" -VLAN 24 -VLANTag 3 - Adds all JumpCloud users associated with the JumpCloud system with a SystemID of '5a0795aa7127f4aa2ddb154a' and adds them to the JumpCloud system with a SystemID of '59f2c305383cba7e369df7c2' using Parameter Binding and the pipeline. Because '-Administrator' was not specified the users will be added as standard users + By specifying the '-VLAN' parameter three radius attributes are added to the JumpCloud user group 'BoulderOffice'. The use of '-VLANTag' appends each VLAN attribute name with a colon and the tag number specified. -------------------------- Example 3 -------------------------- - PS C:\> Get-JCUserGroupMember -GroupName 'The Band' | Add-JCSystemUser -SystemID 5a0795nnie7127f4ev2erb154a -Administrator $True + Add-JCRadiusReplyAttribute -GroupName "BoulderOffice" -NumberOfAttributes 2 -Attribute1_name "Session-Timeout" -Attribute1_value 100 -Attribute2_name "Termination-Action" -Attribute2_value 1 - Adds all JumpCloud users in the JumpCloud User Group 'The Band' and binds them to the JumpCloud system with a SystemID of '5a0795nnie7127f4ev2erb154a' as Administrators using Parameter Binding and the pipeline. + Adds two Radius attributes to the JumpCloud user group 'BoulderOffice'. The parameter '-NumberOfAttributes' is a dynamic parameter that generates two required parameters for each custom attribute specified. In this example these parameters are -Attribute1_name,-Attribute1_value, -Attribute2_name and -Attribute2_value. + + + + -------------------------- Example 4 -------------------------- + Add-JCRadiusReplyAttribute -GroupName "BoulderOffice" -VLAN 24 -NumberOfAttributes 2 -Attribute1_name "Session-Timeout" -Attribute1_value 100 -Attribute2_name "Termination-Action" -Attribute2_value 1 + + Adds five Radius reply attributes to the JumpCloud User group 'BoulderUsers'. By specifying the '-VLAN' parameter three radius attributes are added to the JumpCloud user group 'BoulderOffice'. The value specified for the '-VLAN' parameter is populated for the value of Tunnel-Private-Group-Id .The parameter '-NumberOfAttributes' is a dynamic parameter that generates two required parameters for each custom attribute specified. In this example these parameters are -Attribute1_name,-Attribute1_value, -Attribute2_name and -Attribute2_value. Online Version: - https://github.com/TheJumpCloud/support/wiki/Add-JCSystemUser + https://github.com/TheJumpCloud/support/wiki/Add-JCRadiusReplyAttribute - Add-JCUserGroupMember + Add-JCSystemGroupMember Add - JCUserGroupMember + JCSystemGroupMember - Adds a JumpCloud user to a JumpCloud User Group. + Adds a JumpCloud System to a JumpCloud System Group - The Add-JCUserGroupMember function is used to add a JumpCloud user to a JumpCloud User Group. The new user can be added by Username or by UserID. + The Add-JCSystemGroupMember function is used to add a JumpCloud System to a JumpCloud System Group. The new System Group member must be added by the SystemID parameter. - Add-JCUserGroupMember + Add-JCSystemGroupMember GroupName - The name of the JumpCloud User Group that you want to add the User to. + The name of the JumpCloud System Group that you want to add the System to. System.String @@ -1412,7 +1482,7 @@ ByID - Use the -ByID parameter when either the UserID or GroupID is being passed over the pipeline to the Add-JCUserGroupMember function. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which will increase the function speed and performance. + Use the -ByID parameter when the GroupID and SystemID are both being passed over the pipeline to the Add-JCSystemGroupMember function. The -ByID SwitchParameter will set the ParameterSet to "ByID" which will increase the function speed and performance. System.Management.Automation.SwitchParameter @@ -1423,8 +1493,7 @@ GroupID - The GroupID is used in the ParameterSet 'ByID'. The GroupID for a User Group can be found by running the command: - PS C:\> Get-JCGroup -type 'User' + The GroupID is used in the ParameterSet 'ByID'. The GroupID for a System Group can be found by running the command: System.String @@ -1434,13 +1503,13 @@ None - UserID + SystemID - The _id of the User which you want to add to the User Group. - To find a JumpCloud UserID run the command: - PS C:\> Get-JCUser | Select username, _id - The UserID will be the 24 character string populated for the _id field. - UserID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCUser function before calling Add-JCUserGroupMember. This is shown in EXAMPLES 2, 3, and 4. + The _id of the System which you want to add to the System Group. + To find a JumpCloud SystemID run the command: + PS C:\> Get-JCSystem | Select hostname, _id + The SystemID will be the 24 character string populated for the _id field. + SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCSystem function before calling Add-JCSystemGroupMember. This is shown in EXAMPLES 2, 3, and 4. System.String @@ -1451,11 +1520,11 @@ - Add-JCUserGroupMember + Add-JCSystemGroupMember GroupName - The name of the JumpCloud User Group that you want to add the User to. + The name of the JumpCloud System Group that you want to add the System to. System.String @@ -1464,10 +1533,14 @@ None - - Username + + SystemID - The Username of the JumpCloud user you wish to add to the User Group. + The _id of the System which you want to add to the System Group. + To find a JumpCloud SystemID run the command: + PS C:\> Get-JCSystem | Select hostname, _id + The SystemID will be the 24 character string populated for the _id field. + SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCSystem function before calling Add-JCSystemGroupMember. This is shown in EXAMPLES 2, 3, and 4. System.String @@ -1482,7 +1555,7 @@ ByID - Use the -ByID parameter when either the UserID or GroupID is being passed over the pipeline to the Add-JCUserGroupMember function. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which will increase the function speed and performance. + Use the -ByID parameter when the GroupID and SystemID are both being passed over the pipeline to the Add-JCSystemGroupMember function. The -ByID SwitchParameter will set the ParameterSet to "ByID" which will increase the function speed and performance. System.Management.Automation.SwitchParameter @@ -1494,8 +1567,7 @@ GroupID - The GroupID is used in the ParameterSet 'ByID'. The GroupID for a User Group can be found by running the command: - PS C:\> Get-JCGroup -type 'User' + The GroupID is used in the ParameterSet 'ByID'. The GroupID for a System Group can be found by running the command: System.String @@ -1507,7 +1579,7 @@ GroupName - The name of the JumpCloud User Group that you want to add the User to. + The name of the JumpCloud System Group that you want to add the System to. System.String @@ -1517,25 +1589,13 @@ None - UserID - - The _id of the User which you want to add to the User Group. - To find a JumpCloud UserID run the command: - PS C:\> Get-JCUser | Select username, _id - The UserID will be the 24 character string populated for the _id field. - UserID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCUser function before calling Add-JCUserGroupMember. This is shown in EXAMPLES 2, 3, and 4. - - System.String - - System.String - - - None - - - Username + SystemID - The Username of the JumpCloud user you wish to add to the User Group. + The _id of the System which you want to add to the System Group. + To find a JumpCloud SystemID run the command: + PS C:\> Get-JCSystem | Select hostname, _id + The SystemID will be the 24 character string populated for the _id field. + SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCSystem function before calling Add-JCSystemGroupMember. This is shown in EXAMPLES 2, 3, and 4. System.String @@ -1573,93 +1633,106 @@ -------------------------- Example 1 -------------------------- - PS C:\> Add-JCUserGroupMember -Username cclemons -GroupName 'The Band' + PS C:\> Add-JCSystemGroupMember -GroupName 'Windows Systems' -SystemID '59dad305383roc7k369sf7s2' - Adds the JumpCloud user with Username 'cclemons' to the User Group 'The Band' + Adds a System with SystemID '59dad305383roc7k369sf7s2' to the System Group 'Windows Systems' -------------------------- Example 2 -------------------------- - PS C:\> Get-JCUser | Where-Object sudo -EQ $true | Add-JCUserGroupMember -GroupName 'Administrators' + PS C:\> Get-JCSystem | Where-Object os -Like *Mac* | Add-JCSystemGroupMember -GroupName 'Mac Systems' - Adds all JumpCloud users where the 'sudo' attribute is equal to $true to the User Group 'Administrators' + Adds all Systems with an operating system like 'Mac' to the System Group 'Mac Systems' -------------------------- Example 3 -------------------------- - PS C:\> Get-JCUser | Where-Object created -gt (Get-Date).AddDays(-7) | Add-JCUserGroupMember -GroupName 'New Hires' + Get-JCSystem | Where-Object active -EQ $true | Add-JCSystemGroupMember -GroupName 'Active Systems' - Adds all JumpCloud users created within the last 7 days to the User Group 'New Hires' + Adds all active systems to the System Group 'Active Systems' -------------------------- Example 4 -------------------------- - Get-JCUser | Select-Object username, @{name='Attribute Value'; expression={$_.attributes.value}} | Where-Object 'Attribute Value' -Like *Sales* | Add-JCUserGroupMember -GroupName Sales + Get-JCSystem | Where-Object {$_.active -EQ $true -and $_.os -like '*Mac*'} | Add-JCSystemGroupMember 'Active Mac Systems' - Adds all JumpCloud users with a custom attribute value which contains 'Sales' to the JumpCloud User Group 'Sales'. Note that to access the value of a nested property you must use Select-Object to access the nested property. In this example a calculated property is also used. + Adds all active systems with an operating system like 'Mac' to the System Group 'Active Mac Systems' Online Version: - https://github.com/TheJumpCloud/support/wiki/Add-JCUserGroupMember + https://github.com/TheJumpCloud/support/wiki/Add-JCSystemGroupMember - Backup-JCOrganization - Backup - JCOrganization + Add-JCSystemUser + Add + JCSystemUser - Backup your JumpCloud organization to local json files + Associates a JumpCloud User account with a local account on a JumpCloud managed System. - This function exports objects and associations from your JumpCloud organization to local json files. Association takes a significant amount of time to gather. The -Format:('csv') is slower than standard json output. + The Add-JCSystemUser function allows you to bind a JumpCloud user to a JumpCloud system and set the user pemissions. When binding a user to a system the JumpCloud agent can complete one of two actions on the target system. 1. If there is an existing local user account on the target system with a Username that matches identically with the Username of the newly bound user then the JumpCloud agent will take over and manage the password of the existing local account. 1. If there is not an existing local user account on the target system with a Username that matches identically with the Username of the newly bound user then the JumpCloud agent will create a new account on the system with the Username of the newly bound user. - Backup-JCOrganization - - All + Add-JCSystemUser + + Administrator - Backup all available types and associations + A boolean $true/$false value to set Administrator permissions on the target JumpCloud system + System.Boolean - System.Management.Automation.SwitchParameter + System.Boolean - False + None - - Format + + SystemID - The format of the output files + The _id of the System which you want to bind the JumpCloud user to. + To find a JumpCloud SystemID run the command: + PS C:\> Get-JCSystem | Select hostname, _id + The SystemID will be the 24 character string populated for the _id field. + SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically by calling a JumpCloud function that returns the SystemID. System.String System.String - Json + None - - PassThru + + UserID - Return object metadata to pipeline + The _id of the User which you want to add to the JumpCloud system. + To find a JumpCloud UserID run the command: + PS C:\> Get-JCUser | Select username, _id + The UserID will be the 24 character string populated for the _id field. + UserID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud UserID. This is shown in EXAMPLES 2, 3, and 4. + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - - Path + + + Add-JCSystemUser + + Username - File path for backup output + The Username of the JumpCloud user you wish to add to the JumpCloud system. System.String @@ -1668,47 +1741,26 @@ None - - - Backup-JCOrganization - - Association + + Administrator - Use to backup association data - - - System.Management.Automation.SwitchParameter - - - False - - - Format - - The format of the output files - - System.String - - System.String - - - Json - - - PassThru - - Return object metadata to pipeline + A boolean $true/$false value to set Administrator permissions on the target JumpCloud system + System.Boolean - System.Management.Automation.SwitchParameter + System.Boolean - False + None - - Path + + SystemID - File path for backup output + The _id of the System which you want to bind the JumpCloud user to. + To find a JumpCloud SystemID run the command: + PS C:\> Get-JCSystem | Select hostname, _id + The SystemID will be the 24 character string populated for the _id field. + SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically by calling a JumpCloud function that returns the SystemID. System.String @@ -1717,96 +1769,94 @@ None - - Type - - JumpCloud objects that you want to backup - - System.String[] - - System.String[] - - - None - - - All + + Administrator - Backup all available types and associations + A boolean $true/$false value to set Administrator permissions on the target JumpCloud system - System.Management.Automation.SwitchParameter + System.Boolean - System.Management.Automation.SwitchParameter + System.Boolean - False + None - - Association + + SystemID - Use to backup association data + The _id of the System which you want to bind the JumpCloud user to. + To find a JumpCloud SystemID run the command: + PS C:\> Get-JCSystem | Select hostname, _id + The SystemID will be the 24 character string populated for the _id field. + SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically by calling a JumpCloud function that returns the SystemID. - System.Management.Automation.SwitchParameter + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - - Format + + UserID - The format of the output files + The _id of the User which you want to add to the JumpCloud system. + To find a JumpCloud UserID run the command: + PS C:\> Get-JCUser | Select username, _id + The UserID will be the 24 character string populated for the _id field. + UserID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud UserID. This is shown in EXAMPLES 2, 3, and 4. System.String System.String - Json + None - - PassThru + + Username - Return object metadata to pipeline + The Username of the JumpCloud user you wish to add to the JumpCloud system. - System.Management.Automation.SwitchParameter + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - - Path + + + + + System.String + - File path for backup output + - System.String + + - System.String - + System.Boolean - None - - - Type - JumpCloud objects that you want to backup + - System.String[] + + + + - System.String[] - + System.Object - None - - - - + + + + + @@ -1814,86 +1864,53 @@ - -------------------------- EXAMPLE 1 -------------------------- - Backup all available JumpCloud objects and their associations -PS C:\> Backup-JCOrganization -Path:('C:\Temp') - - - - - - -------------------------- EXAMPLE 2 -------------------------- - Backup all available JumpCloud objects and their associations to CSV (default json) -PS C:\> Backup-JCOrganization -Path:('C:\Temp') -Format:('csv') - - - - - - -------------------------- EXAMPLE 3 -------------------------- - Backup selected types UserGroups and Users with no associations -PS C:\> Backup-JCOrganization -Path:('C:\Temp') -Type:('UserGroup','User') - - - - - - -------------------------- EXAMPLE 4 -------------------------- - Backup selected types UserGroups and Users with their associations -PS C:\> Backup-JCOrganization -Path:('C:\Temp') -Type:('UserGroup','User') -Association + -------------------------- Example 1 -------------------------- + PS C:\> Add-JCSystemUser -Username cclemons -SystemID 5a0795nnie7127f4ev2erb154a -Administrator $True - + Adds the JumpCloud user with the Username 'cclemons' to the System with a SystemID of '5a0795nnie7127f4ev2erb154a' and grants administrator permission - -------------------------- EXAMPLE 5 -------------------------- - Backup UserGroups and Users without their associations -PS C:\> Backup-JCOrganization -Path:('C:\Temp') -Type:('UserGroup','User') + -------------------------- Example 2 -------------------------- + PS C:\> Get-JCSystemUser -SystemID 5a0795nnie7127f4ev2erb154a | Add-JCSystemUser -SystemID 59f2c305383cba7e369df7c2 - + Adds all JumpCloud users associated with the JumpCloud system with a SystemID of '5a0795aa7127f4aa2ddb154a' and adds them to the JumpCloud system with a SystemID of '59f2c305383cba7e369df7c2' using Parameter Binding and the pipeline. Because '-Administrator' was not specified the users will be added as standard users - -------------------------- EXAMPLE 6 -------------------------- - Backup all available JumpCloud objects and their associations and return metadata -PS C:\> $BackupJcOrganizationResults = Backup-JCOrganization -Path:('C:\Temp') -PassThru -PS C:\> $BackupJcOrganizationResults.Keys -PS C:\> $BackupJcOrganizationResults.User + -------------------------- Example 3 -------------------------- + PS C:\> Get-JCUserGroupMember -GroupName 'The Band' | Add-JCSystemUser -SystemID 5a0795nnie7127f4ev2erb154a -Administrator $True - + Adds all JumpCloud users in the JumpCloud User Group 'The Band' and binds them to the JumpCloud system with a SystemID of '5a0795nnie7127f4ev2erb154a' as Administrators using Parameter Binding and the pipeline. Online Version: - https://github.com/TheJumpCloud/support/wiki/ - - - https://github.com/TheJumpCloud/support/tree/master/PowerShell/JumpCloud%20Module/Docs/Backup-JCOrganization.md - https://github.com/TheJumpCloud/support/tree/master/PowerShell/JumpCloud%20Module/Docs/Backup-JCOrganization.md + https://github.com/TheJumpCloud/support/wiki/Add-JCSystemUser - Connect-JCOnline - Connect - JCOnline + Add-JCUserGroupMember + Add + JCUserGroupMember - The Connect-JCOnline function sets the global variable $JCAPIKEY + Adds a JumpCloud user to a JumpCloud User Group. - By calling the Connect-JCOnline function you are setting the variable $JCAPIKEY within the global scope. By setting this variable in the global scope the variable $JCAPIKEY can be reused by other functions in the JumpCloud module. If you wish to change the API key to connect to another JumpCloud org simply call the Connect-JCOnline function and enter the alternative API key. Introduced in JumpCloud module version 1.2 the Connect-JCOnline function will also check to ensure you are running the latest version of the JumpCloud PowerShell module and offer to update the module if there is an update available. To prevent the module update check the '-force' parameter can be used. + The Add-JCUserGroupMember function is used to add a JumpCloud user to a JumpCloud User Group. The new user can be added by Username or by UserID. - Connect-JCOnline - - JumpCloudApiKey + Add-JCUserGroupMember + + GroupName - Please enter your JumpCloud API key. This can be found in the JumpCloud admin console within "API Settings" accessible from the drop down icon next to the admin email address in the top right corner of the JumpCloud admin console. + The name of the JumpCloud User Group that you want to add the User to. System.String @@ -1902,27 +1919,23 @@ PS C:\> $BackupJcOrganizationResults.User None - - JumpCloudOrgId + + ByID - Organization Id can be found in the Settings page within the admin console. Only needed for multi tenant admins. + Use the -ByID parameter when either the UserID or GroupID is being passed over the pipeline to the Add-JCUserGroupMember function. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which will increase the function speed and performance. - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - JCEnvironment + + GroupID - Specific to JumpCloud development team to connect to staging dev environment. + The GroupID is used in the ParameterSet 'ByID'. The GroupID for a User Group can be found by running the command: + PS C:\> Get-JCGroup -type 'User' - - production - staging - System.String System.String @@ -1930,24 +1943,56 @@ PS C:\> $BackupJcOrganizationResults.User None - - force + + UserID - Using the "-Force" parameter the module update check is skipped. The '-Force' parameter should be used when using the JumpCloud module in scripts or other automation environments. + The _id of the User which you want to add to the User Group. + To find a JumpCloud UserID run the command: + PS C:\> Get-JCUser | Select username, _id + The UserID will be the 24 character string populated for the _id field. + UserID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCUser function before calling Add-JCUserGroupMember. This is shown in EXAMPLES 2, 3, and 4. + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - - - - force - - Using the "-Force" parameter the module update check is skipped. The '-Force' parameter should be used when using the JumpCloud module in scripts or other automation environments. + + Add-JCUserGroupMember + + GroupName + + The name of the JumpCloud User Group that you want to add the User to. + + System.String + + System.String + + + None + + + Username + + The Username of the JumpCloud user you wish to add to the User Group. + + System.String + + System.String + + + None + + + + + + ByID + + Use the -ByID parameter when either the UserID or GroupID is being passed over the pipeline to the Add-JCUserGroupMember function. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which will increase the function speed and performance. System.Management.Automation.SwitchParameter @@ -1956,10 +2001,11 @@ PS C:\> $BackupJcOrganizationResults.User False - - JCEnvironment + + GroupID - Specific to JumpCloud development team to connect to staging dev environment. + The GroupID is used in the ParameterSet 'ByID'. The GroupID for a User Group can be found by running the command: + PS C:\> Get-JCGroup -type 'User' System.String @@ -1968,10 +2014,10 @@ PS C:\> $BackupJcOrganizationResults.User None - - JumpCloudApiKey + + GroupName - Please enter your JumpCloud API key. This can be found in the JumpCloud admin console within "API Settings" accessible from the drop down icon next to the admin email address in the top right corner of the JumpCloud admin console. + The name of the JumpCloud User Group that you want to add the User to. System.String @@ -1980,10 +2026,26 @@ PS C:\> $BackupJcOrganizationResults.User None - - JumpCloudOrgId + + UserID - Organization Id can be found in the Settings page within the admin console. Only needed for multi tenant admins. + The _id of the User which you want to add to the User Group. + To find a JumpCloud UserID run the command: + PS C:\> Get-JCUser | Select username, _id + The UserID will be the 24 character string populated for the _id field. + UserID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCUser function before calling Add-JCUserGroupMember. This is shown in EXAMPLES 2, 3, and 4. + + System.String + + System.String + + + None + + + Username + + The Username of the JumpCloud user you wish to add to the User Group. System.String @@ -2021,102 +2083,93 @@ PS C:\> $BackupJcOrganizationResults.User -------------------------- Example 1 -------------------------- - Connect-JCOnline lu8792c9d4y2398is1tb6h0b83ebf0e92s97t382 + PS C:\> Add-JCUserGroupMember -Username cclemons -GroupName 'The Band' - + Adds the JumpCloud user with Username 'cclemons' to the User Group 'The Band' -------------------------- Example 2 -------------------------- - Connect-JCOnline lu8792c9d4y2398is1tb6h0b83ebf0e92s97t382 -force + PS C:\> Get-JCUser | Where-Object sudo -EQ $true | Add-JCUserGroupMember -GroupName 'Administrators' - Using the "-Force" parameter the module update check is skipped. The '-Force' parameter should be used when using the JumpCloud module in scripts or other automation environments. + Adds all JumpCloud users where the 'sudo' attribute is equal to $true to the User Group 'Administrators' -------------------------- Example 3 -------------------------- - Connect-JCOnline -JumpCloudAPIKey lu8792c9d4y2398is1tb6h0b83ebf0e92s97t382 -JumpCloudOrgID 5b5o13o06tsand0c29a0t3s6 -force + PS C:\> Get-JCUser | Where-Object created -gt (Get-Date).AddDays(-7) | Add-JCUserGroupMember -GroupName 'New Hires' - Providing the JumpCloudAPIKey key and the intended JumpCloudOrg ID to connect to multi tenant admins can skip the JumpCloudOrgID connection screen and directly connect to an Org. - Using the "-Force" parameter the module update check is skipped. The '-Force' parameter should be used when using the JumpCloud module in scripts or other automation environments. + Adds all JumpCloud users created within the last 7 days to the User Group 'New Hires' + + + + -------------------------- Example 4 -------------------------- + Get-JCUser | Select-Object username, @{name='Attribute Value'; expression={$_.attributes.value}} | Where-Object 'Attribute Value' -Like *Sales* | Add-JCUserGroupMember -GroupName Sales + + Adds all JumpCloud users with a custom attribute value which contains 'Sales' to the JumpCloud User Group 'Sales'. Note that to access the value of a nested property you must use Select-Object to access the nested property. In this example a calculated property is also used. Online Version: - https://github.com/TheJumpCloud/support/wiki/Connect-JCOnline + https://github.com/TheJumpCloud/support/wiki/Add-JCUserGroupMember - Copy-JCAssociation - Copy - JCAssociation + Backup-JCOrganization + Backup + JCOrganization - Copy the associations from one object to another. + Backup your JumpCloud organization to local json files - This cmdlet will get the associations of an existing object and will copy those same associations over to a new object. + This function exports objects and associations from your JumpCloud organization to local json files. Association takes a significant amount of time to gather. The -Format:('csv') is slower than standard json output. - Copy-JCAssociation - - Type + Backup-JCOrganization + + All - The type of the object. + Backup all available types and associations - - command - ldap_server - policy - application - radius_server - system_group - system - user_group - user - g_suite - office_365 - - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - Id + + Format - The unique id of the object. + The format of the output files - System.String[] + System.String - System.String[] + System.String - None + Json - - TargetId + + PassThru - The unique id of the target object. + Return object metadata to pipeline - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - TargetName + + Path - The name of the target object. + File path for backup output System.String @@ -2125,10 +2178,13 @@ PS C:\> $BackupJcOrganizationResults.User None - - RemoveExisting + + + Backup-JCOrganization + + Association - Removes the existing associations while still adding the new associations. + Use to backup association data System.Management.Automation.SwitchParameter @@ -2136,60 +2192,22 @@ PS C:\> $BackupJcOrganizationResults.User False - - IncludeType - - Specify the association types to include in the copy. - - - user - user_group - system - system_group - policy - command - application - g_suite - ldap_server - office_365 - radius_server - - System.String[] - - System.String[] - - - None - - - ExcludeType + + Format - Specify the association types to exclude from the copy. + The format of the output files - - user - user_group - system - system_group - policy - command - application - g_suite - ldap_server - office_365 - radius_server - - System.String[] + System.String - System.String[] + System.String - None + Json - - Force + + PassThru - Bypass user prompts and dynamic ValidateSet. + Return object metadata to pipeline System.Management.Automation.SwitchParameter @@ -2197,27 +2215,11 @@ PS C:\> $BackupJcOrganizationResults.User False - - - Copy-JCAssociation - - Type + + Path - The type of the object. + File path for backup output - - command - ldap_server - policy - application - radius_server - system_group - system - user_group - user - g_suite - office_365 - System.String System.String @@ -2225,10 +2227,10 @@ PS C:\> $BackupJcOrganizationResults.User None - - Name + + Type - The name of the object. + JumpCloud objects that you want to backup System.String[] @@ -2237,121 +2239,13 @@ PS C:\> $BackupJcOrganizationResults.User None - - TargetId - - The unique id of the target object. - - System.String - - System.String - - - None - - - TargetName - - The name of the target object. - - System.String - - System.String - - - None - - - RemoveExisting - - Removes the existing associations while still adding the new associations. - - - System.Management.Automation.SwitchParameter - - - False - - - IncludeType - - Specify the association types to include in the copy. - - - user - user_group - system - system_group - policy - command - application - g_suite - ldap_server - office_365 - radius_server - - System.String[] - - System.String[] - - - None - - - ExcludeType - - Specify the association types to exclude from the copy. - - - user - user_group - system - system_group - policy - command - application - g_suite - ldap_server - office_365 - radius_server - - System.String[] - - System.String[] - - - None - - - Force - - Bypass user prompts and dynamic ValidateSet. - - - System.Management.Automation.SwitchParameter - - - False - - - ExcludeType - - Specify the association types to exclude from the copy. - - System.String[] - - System.String[] - - - None - - - Force + + All - Bypass user prompts and dynamic ValidateSet. + Backup all available types and associations System.Management.Automation.SwitchParameter @@ -2360,46 +2254,34 @@ PS C:\> $BackupJcOrganizationResults.User False - - Id - - The unique id of the object. - - System.String[] - - System.String[] - - - None - - - IncludeType + + Association - Specify the association types to include in the copy. + Use to backup association data - System.String[] + System.Management.Automation.SwitchParameter - System.String[] + System.Management.Automation.SwitchParameter - None + False - - Name + + Format - The name of the object. + The format of the output files - System.String[] + System.String - System.String[] + System.String - None + Json - - RemoveExisting + + PassThru - Removes the existing associations while still adding the new associations. + Return object metadata to pipeline System.Management.Automation.SwitchParameter @@ -2408,22 +2290,10 @@ PS C:\> $BackupJcOrganizationResults.User False - - TargetId - - The unique id of the target object. - - System.String - - System.String - - - None - - - TargetName + + Path - The name of the target object. + File path for backup output System.String @@ -2432,55 +2302,21 @@ PS C:\> $BackupJcOrganizationResults.User None - + Type - The type of the object. + JumpCloud objects that you want to backup - System.String + System.String[] - System.String + System.String[] None - - - - System.String - - - - - - - - System.Management.Automation.SwitchParameter - - - - - - - - System.String[] - - - - - - - - - - System.Object - - - - - - + + @@ -2488,60 +2324,87 @@ PS C:\> $BackupJcOrganizationResults.User - -------------------------- Example 1 -------------------------- - PS C:\> Copy-JCAssociation -Type:('user') -Id:('5cdaef60452f26365ca1fbd0') -TargetId:('5cdaef62de6bf35ce44ad777') + -------------------------- EXAMPLE 1 -------------------------- + Backup all available JumpCloud objects and their associations +PS C:\> Backup-JCOrganization -Path:('C:\Temp') - The command will remove all of 5cdaef62de6bf35ce44ad777 associations and will copy all of 5cdaef60452f26365ca1fbd0 associations to 5cdaef62de6bf35ce44ad777. + - -------------------------- Example 2 -------------------------- - PS C:\> Copy-JCAssociation -Type:('user') -Name:('John') -TargetName:('Jim') + -------------------------- EXAMPLE 2 -------------------------- + Backup all available JumpCloud objects and their associations to CSV (default json) +PS C:\> Backup-JCOrganization -Path:('C:\Temp') -Format:('csv') - The command will remove all of Jim's associations and will copy all of John's associations to Jim. + - - - - Online Version: - https://github.com/TheJumpCloud/support/wiki/Copy-JCAssociation - - - - - - Get-JCAssociation - Get - JCAssociation - - The function Get-JCAssociation can be used to query an object's associations and then provide information about how objects are associated with one another. - - - - The Get-JCAssociation function allows you to view the associations of a specific object to a target object. - - - - Get-JCAssociation - - Type - - The type of the object. - - - command - ldap_server - policy - application - radius_server - system_group - system - user_group - user - g_suite - office_365 - + + -------------------------- EXAMPLE 3 -------------------------- + Backup selected types UserGroups and Users with no associations +PS C:\> Backup-JCOrganization -Path:('C:\Temp') -Type:('UserGroup','User') + + + + + + -------------------------- EXAMPLE 4 -------------------------- + Backup selected types UserGroups and Users with their associations +PS C:\> Backup-JCOrganization -Path:('C:\Temp') -Type:('UserGroup','User') -Association + + + + + + -------------------------- EXAMPLE 5 -------------------------- + Backup UserGroups and Users without their associations +PS C:\> Backup-JCOrganization -Path:('C:\Temp') -Type:('UserGroup','User') + + + + + + -------------------------- EXAMPLE 6 -------------------------- + Backup all available JumpCloud objects and their associations and return metadata +PS C:\> $BackupJcOrganizationResults = Backup-JCOrganization -Path:('C:\Temp') -PassThru +PS C:\> $BackupJcOrganizationResults.Keys +PS C:\> $BackupJcOrganizationResults.User + + + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/ + + + https://github.com/TheJumpCloud/support/tree/master/PowerShell/JumpCloud%20Module/Docs/Backup-JCOrganization.md + https://github.com/TheJumpCloud/support/tree/master/PowerShell/JumpCloud%20Module/Docs/Backup-JCOrganization.md + + + + + + Connect-JCOnline + Connect + JCOnline + + The Connect-JCOnline function sets the global variable $JCAPIKEY + + + + By calling the Connect-JCOnline function you are setting the variable $JCAPIKEY within the global scope. By setting this variable in the global scope the variable $JCAPIKEY can be reused by other functions in the JumpCloud module. If you wish to change the API key to connect to another JumpCloud org simply call the Connect-JCOnline function and enter the alternative API key. Introduced in JumpCloud module version 1.2 the Connect-JCOnline function will also check to ensure you are running the latest version of the JumpCloud PowerShell module and offer to update the module if there is an update available. To prevent the module update check the '-force' parameter can be used. + + + + Connect-JCOnline + + JumpCloudApiKey + + Please enter your JumpCloud API key. This can be found in the JumpCloud admin console within "API Settings" accessible from the drop down icon next to the admin email address in the top right corner of the JumpCloud admin console. + System.String System.String @@ -2549,58 +2412,38 @@ PS C:\> $BackupJcOrganizationResults.User None - - Id + + JumpCloudOrgId - The unique id of the object. + Organization Id can be found in the Settings page within the admin console. Only needed for multi tenant admins. - System.String[] + System.String - System.String[] + System.String None - - TargetType + + JCEnvironment - The type of the target object. + Specific to JumpCloud development team to connect to staging dev environment. - user - user_group - system - system_group - policy - command - application - g_suite - ldap_server - office_365 - radius_server + production + staging - System.String[] + System.String - System.String[] + System.String None - - Direct - - Returns only "Direct" associations. - - - System.Management.Automation.SwitchParameter - - - False - - - Indirect + + force - Returns only "Indirect" associations. + Using the "-Force" parameter the module update check is skipped. The '-Force' parameter should be used when using the JumpCloud module in scripts or other automation environments. System.Management.Automation.SwitchParameter @@ -2608,87 +2451,247 @@ PS C:\> $BackupJcOrganizationResults.User False - - IncludeInfo + + + + + force + + Using the "-Force" parameter the module update check is skipped. The '-Force' parameter should be used when using the JumpCloud module in scripts or other automation environments. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + JCEnvironment + + Specific to JumpCloud development team to connect to staging dev environment. + + System.String + + System.String + + + None + + + JumpCloudApiKey + + Please enter your JumpCloud API key. This can be found in the JumpCloud admin console within "API Settings" accessible from the drop down icon next to the admin email address in the top right corner of the JumpCloud admin console. + + System.String + + System.String + + + None + + + JumpCloudOrgId + + Organization Id can be found in the Settings page within the admin console. Only needed for multi tenant admins. + + System.String + + System.String + + + None + + + + + + System.String + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Connect-JCOnline lu8792c9d4y2398is1tb6h0b83ebf0e92s97t382 + + + + + + -------------------------- Example 2 -------------------------- + Connect-JCOnline lu8792c9d4y2398is1tb6h0b83ebf0e92s97t382 -force + + Using the "-Force" parameter the module update check is skipped. The '-Force' parameter should be used when using the JumpCloud module in scripts or other automation environments. + + + + -------------------------- Example 3 -------------------------- + Connect-JCOnline -JumpCloudAPIKey lu8792c9d4y2398is1tb6h0b83ebf0e92s97t382 -JumpCloudOrgID 5b5o13o06tsand0c29a0t3s6 -force + + Providing the JumpCloudAPIKey key and the intended JumpCloudOrg ID to connect to multi tenant admins can skip the JumpCloudOrgID connection screen and directly connect to an Org. + Using the "-Force" parameter the module update check is skipped. The '-Force' parameter should be used when using the JumpCloud module in scripts or other automation environments. + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/Connect-JCOnline + + + + + + Copy-JCAssociation + Copy + JCAssociation + + Copy the associations from one object to another. + + + + This cmdlet will get the associations of an existing object and will copy those same associations over to a new object. + + + + Copy-JCAssociation + + Type - Appends "Info" and "TargetInfo" properties to output. + The type of the object. + + command + ldap_server + policy + application + radius_server + system_group + system + user_group + user + g_suite + office_365 + + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - - IncludeNames + + Id - Appends "Name" and "TargetName" properties to output. + The unique id of the object. + System.String[] - System.Management.Automation.SwitchParameter + System.String[] - False + None - - IncludeVisualPath + + TargetId - Appends "visualPathById", "visualPathByName", and "visualPathByType" properties to output. + The unique id of the target object. + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - - Fields + + TargetName - An array of the fields/properties/columns you want to return from the search. + The name of the target object. - System.Array + System.String - System.Array + System.String None - - Limit + + RemoveExisting - The number of items you want to return per API call. + Removes the existing associations while still adding the new associations. - System.Int32 - System.Int32 + System.Management.Automation.SwitchParameter - None + False - - Skip + + IncludeType - The number of items you want to skip over per API call. + Specify the association types to include in the copy. - System.Int32 + + user + user_group + system + system_group + policy + command + application + g_suite + ldap_server + office_365 + radius_server + + System.String[] - System.Int32 + System.String[] None - - Paginate + + ExcludeType - Whether or not you want to paginate through the results. + Specify the association types to exclude from the copy. - True - False + user + user_group + system + system_group + policy + command + application + g_suite + ldap_server + office_365 + radius_server - System.Boolean + System.String[] - System.Boolean + System.String[] None @@ -2706,7 +2709,7 @@ PS C:\> $BackupJcOrganizationResults.User - Get-JCAssociation + Copy-JCAssociation Type @@ -2744,79 +2747,34 @@ PS C:\> $BackupJcOrganizationResults.User None - - TargetType + + TargetId - The type of the target object. + The unique id of the target object. - - user - user_group - system - system_group - policy - command - application - g_suite - ldap_server - office_365 - radius_server - - System.String[] + System.String - System.String[] + System.String None - - Direct - - Returns only "Direct" associations. - - - System.Management.Automation.SwitchParameter - - - False - - - Indirect - - Returns only "Indirect" associations. - - - System.Management.Automation.SwitchParameter - - - False - - - IncludeInfo - - Appends "Info" and "TargetInfo" properties to output. - - - System.Management.Automation.SwitchParameter - - - False - - - IncludeNames + + TargetName - Appends "Name" and "TargetName" properties to output. + The name of the target object. + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - - IncludeVisualPath + + RemoveExisting - Appends "visualPathById", "visualPathByName", and "visualPathByType" properties to output. + Removes the existing associations while still adding the new associations. System.Management.Automation.SwitchParameter @@ -2824,54 +2782,52 @@ PS C:\> $BackupJcOrganizationResults.User False - - Fields - - An array of the fields/properties/columns you want to return from the search. - - System.Array - - System.Array - - - None - - - Limit - - The number of items you want to return per API call. - - System.Int32 - - System.Int32 - - - None - - - Skip + + IncludeType - The number of items you want to skip over per API call. + Specify the association types to include in the copy. - System.Int32 + + user + user_group + system + system_group + policy + command + application + g_suite + ldap_server + office_365 + radius_server + + System.String[] - System.Int32 + System.String[] None - - Paginate + + ExcludeType - Whether or not you want to paginate through the results. + Specify the association types to exclude from the copy. - True - False + user + user_group + system + system_group + policy + command + application + g_suite + ldap_server + office_365 + radius_server - System.Boolean + System.String[] - System.Boolean + System.String[] None @@ -2890,26 +2846,14 @@ PS C:\> $BackupJcOrganizationResults.User - - Direct + + ExcludeType - Returns only "Direct" associations. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - Fields - - An array of the fields/properties/columns you want to return from the search. + Specify the association types to exclude from the copy. - System.Array + System.String[] - System.Array + System.String[] None @@ -2938,62 +2882,14 @@ PS C:\> $BackupJcOrganizationResults.User None - - IncludeInfo - - Appends "Info" and "TargetInfo" properties to output. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - IncludeNames - - Appends "Name" and "TargetName" properties to output. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - IncludeVisualPath - - Appends "visualPathById", "visualPathByName", and "visualPathByType" properties to output. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - Indirect - - Returns only "Indirect" associations. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - Limit + + IncludeType - The number of items you want to return per API call. + Specify the association types to include in the copy. - System.Int32 + System.String[] - System.Int32 + System.String[] None @@ -3010,34 +2906,34 @@ PS C:\> $BackupJcOrganizationResults.User None - - Paginate + + RemoveExisting - Whether or not you want to paginate through the results. + Removes the existing associations while still adding the new associations. - System.Boolean + System.Management.Automation.SwitchParameter - System.Boolean + System.Management.Automation.SwitchParameter - None + False - - TargetType + + TargetId - The type of the target object. + The unique id of the target object. - System.String[] + System.String - System.String[] + System.String None - - Type + + TargetName - The type of the object. + The name of the target object. System.String @@ -3046,14 +2942,14 @@ PS C:\> $BackupJcOrganizationResults.User None - - Skip + + Type - The number of items you want to skip over per API call. + The type of the object. - System.Int32 + System.String - System.Int32 + System.String None @@ -3084,30 +2980,6 @@ PS C:\> $BackupJcOrganizationResults.User - - - System.Array - - - - - - - - System.Int32 - - - - - - - - System.Boolean - - - - - @@ -3127,129 +2999,107 @@ PS C:\> $BackupJcOrganizationResults.User -------------------------- Example 1 -------------------------- - PS C:\> Get-JCAssociation -Type:user_group -Name:employee -TargetType:users + PS C:\> Copy-JCAssociation -Type:('user') -Id:('5cdaef60452f26365ca1fbd0') -TargetId:('5cdaef62de6bf35ce44ad777') - List all "users" that are associated with the user_group "employee". + The command will remove all of 5cdaef62de6bf35ce44ad777 associations and will copy all of 5cdaef60452f26365ca1fbd0 associations to 5cdaef62de6bf35ce44ad777. -------------------------- Example 2 -------------------------- - PS C:\> Get-JCAssociation -Type:system -Id:5c9a95f84tdo1376318g5148 - - List all associations with the system "5c9a95f84tdo1376318g5148". - - - - -------------------------- Example 3 -------------------------- - PS C:\> Get-JCAssociation -Type:system -Id:5c9a95f84tdo1376318g5148 -TargetType:users -Direct - - List all "users" that have a direct association with the system "5c9a95f84tdo1376318g5148". - - - - -------------------------- Example 4 -------------------------- - PS C:\> Get-JCAssociation -Type:system -Id:5c9a95f84tdo1376318g5148 -TargetType:users -Indirect - - List all "users" that have a indirect association with the system "5c9a95f84tdo1376318g5148". - - - - -------------------------- Example 5 -------------------------- - PS C:\> Get-JCAssociation -Type:system -Id:5c9a95f84tdo1376318g5148 -TargetType:users -IncludeInfo -IncludeNames -IncludeVisualPath + PS C:\> Copy-JCAssociation -Type:('user') -Name:('John') -TargetName:('Jim') - List all "users" that are associated with the system "5c9a95f84tdo1376318g5148" and also get additional metadata about each object. + The command will remove all of Jim's associations and will copy all of John's associations to Jim. Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCAssociation + https://github.com/TheJumpCloud/support/wiki/Copy-JCAssociation - Get-JCBackup + Get-JCAssociation Get - JCBackup + JCAssociation - Backs up JumpCloud directory information to CSV + The function Get-JCAssociation can be used to query an object's associations and then provide information about how objects are associated with one another. - The Get-JCBackup command saves JumpCloud directory information to CSV files. This command can be used to backup user, system user, system, user group, and system group information to CSV files. Specific items can be selected for CSV backup using the command or the '-All' switch parameter can be specified which will backup all items. How JCBackup works JumpCloud user information can be queried using the JumpCloud PowerShell module command Get-JCUser (https://github.com/TheJumpCloud/support/wiki/Get-JCUser)This command will by default return all JumpCloud user properties. - To export only the JumpCloud user information presented within the JumpCloud admin console ("First Name", "Last Name", "Username" and "Email") use the '-returnProperties' parameter of the Get-JCUser command as shown below. Note JumpCloud unique IDs (_id) are always returned when using the Get-JCUser command. - - Get-JCUser -returnProperties firstname, lastname, username, email | Export-CSV -Path "JumpCloudUsers_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation - - This command will export all JumpCloud users first name, last name, username, id, and email to a CSV file named JumpCloudUsers_CurrentDate.CSV created within the directory where the command is run. - If enforcing UID/GID consistency and you wish to export this information run the following command: - Get-JCUser -returnProperties firstname, lastname, username, email, unix_uid, unix_guid | Export-CSV -Path "JumpCloudUsers_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation - This command will export all JumpCloud users first name, last name, username, id, email, unix_guid, and unix_uid to a CSV file named JumpCloudUsers_CurrentDate.CSV created within the directory where the command is run. - To export all information describing JumpCloud users to CSV some additional object expansion must be done. - The properties "attributes", "addresses", "phonenumbers" and "ssh_keys" of JumpCloud users are returned as nested objects via the JumpCloud PowerShell module. - This means that if the objects are not expanded before exporting to CSV they will simply display as a 'System.Object[]' in the output CSV file. - To account for this find the below example which expands each nested object using PowerShell calculated properties and converts the objects to the JSON format. Note the backtick '`' escape character is used to break this command into multiple lines for readability. - Get-JCUser | Select-Object * , ` @{Name = 'attributes'; Expression = {$_.attributes | ConvertTo-Json}}, ` @{Name = 'addresses'; Expression = {$_.addresses | ConvertTo-Json}}, ` @{Name = 'phonenumbers'; Expression = {$_.phonenumbers | ConvertTo-Json}}, ` @{Name = 'ssh_keys'; Expression = {$_.ssh_keys | ConvertTo-Json}} ` -ExcludeProperty attributes, addresses, phonenumbers, ssh_keys | Export-CSV -Path "JumpCloudUsers_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation - This command will gather and format all JumpCloud user information and export it to a CSV file named JumpCloudUsers_CurrentDate.CSV created within the directory where the command is run. If you wish to exclude certain user properties you can append the '-ExcludeProperty' list with the properties you wish to exclude. Backing up JumpCloud System User Information JumpCloud system user associations can be queried using the JumpCloud PowerShell module command Get-JCSystemUser (https://github.com/TheJumpCloud/support/wiki/Get-JCUser)The Get-JCSystemUser command will show all JumpCloud users associated with a specific JumpCloud System using the JumpCloud System ID. - To export all JumpCloud system user information to CSV use the following example. - The property "BindGroups" is returned as a nested object via the JumpCloud PowerShell module. - This means that if the object is expanded before exporting to CSV it will simply display as a 'System.Object[]' in the output CSV file. - To account for this the "BindGroups" property is expanded using a PowerShell calculated property. - Get-JCSystem | Get-JCSystemUser | Select-Object -Property * , @{Name = 'BindGroups'; Expression = {$ .BindGroups | ConvertTo-Json}} -ExcludeProperty BindGroups | Export-CSV -Path "JumpCloudSystemUsers $(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation - This command will gather and format all JumpCloud system user associations and export them to a CSV file named JumpCloudSystemUsers_CurrentDate.CSV created within the directory where the command is run. Backing up JumpCloud System Information JumpCloud system information can be queried using the JumpCloud PowerShell module command Get-JCSystem (https://github.com/TheJumpCloud/support/wiki/Get-JCSystemUser)This command will by default return all JumpCloud system properties. Note The properties JumpCloud System ID (_id) and lastContact are always returned when using the Get-JCSystem command. - To only return and export specific system properties to CSV use the '-returnProperties' parameter of the Get-JCSystem command. - Get-JCSystem -returnProperties hostname, os, version, serialNumber, remoteIP, systemTimezone | Export-CSV -Path "JumpCloudSystems_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation - This command will export all JumpCloud Systems hostname, os, version, serial number, remoteIP, system time zone, system id, and last conntect time to a CSV file named JumpCloudSystems_CurrentDate.CSV created within the directory where the command is run. - The properties "networkInterfaces" and "sshdParams" of JumpCloud systems are returned as nested objects via the JumpCloud PowerShell module. - This means that if the objects are not expanded before exporting to CSV they will simply display as a 'System.Object[]' in the output CSV file. - To account for this find the below example which expands each nested object using PowerShell calculated properties and converts the objects to the JSON format. Note the back tick '`' escape character is used to break this command into multiple lines for readability. - Get-JCSystem | Select-Object *, ` @{Name = 'networkInterfaces'; Expression = {$_.networkInterfaces | ConvertTo-Json}}, ` @{Name = 'sshdParams'; Expression = {$_.sshdParams | ConvertTo-Json}} ` -ExcludeProperty networkInterfaces, sshdParams, connectionHistory | Export-CSV -Path "JumpCloudSystems_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation - This command will gather and format all JumpCloud system information and export it to a CSV file named JumpCloudSystems_CurrentDate.CSV created within the directory where the command is run. If you wish to exclude certain system properties you can append the '-ExcludeProperty' list with the properties you wish to exclude. Backing up JumpCloud User Groups JumpCloud user group membership can be queried using the JumpCloud PowerShell module command Get-JCUserGroupMember (https://github.com/TheJumpCloud/support/wiki/Get-JCUserGroupMember)Get-JCGroup -Type User | Get-JCUserGroupMember | Export-CSV -Path "JumpCloudUserGroupMembers_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation - This command will save all JumpCloud user groups and the group members to a CSV file named JumpCloudUserGroupMember_CurrentDate.CSV created within the directory where the command is run. Backing up JumpCloud System Groups JumpCloud system group membership can be queried using the JumpCloud PowerShell module command Get-JCSystemGroupMember (https://github.com/TheJumpCloud/support/wiki/Get-JCSystemGroupMember)Get-JCGroup -Type System | Get-JCSystemGroupMember | Export-CSV -Path "JumpCloudSystemGroupMembers_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation - This command will save all JumpCloud system groups and the group members to a CSV file named JumpCloudSystemGroupMember_CurrentDate.CSV created within the directory where the command is run. + The Get-JCAssociation function allows you to view the associations of a specific object to a target object. - Get-JCBackup - - All + Get-JCAssociation + + Type - A switch parameter that when called tells the command to back up JumpCloud user, system user, system, user group, and system group information to CSV files. + The type of the object. + + command + ldap_server + policy + application + radius_server + system_group + system + user_group + user + g_suite + office_365 + + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - - SystemGroups + + Id - A switch parameter that when called backs up JumpCloud system group membership to CSV. + The unique id of the object. + System.String[] - System.Management.Automation.SwitchParameter + System.String[] - False + None - - Systems + + TargetType - A switch parameter that when called backs up JumpCloud system information to CSV. + The type of the target object. - - System.Management.Automation.SwitchParameter - - - False - - - SystemUsers + + user + user_group + system + system_group + policy + command + application + g_suite + ldap_server + office_365 + radius_server + + System.String[] + + System.String[] + + + None + + + Direct - A switch parameter that when called backs up JumpCloud system user information to CSV. + Returns only "Direct" associations. System.Management.Automation.SwitchParameter @@ -3257,10 +3107,10 @@ PS C:\> $BackupJcOrganizationResults.User False - - UserGroups + + Indirect - A switch parameter that when called backs up JumpCloud user group membership to CSV. + Returns only "Indirect" associations. System.Management.Automation.SwitchParameter @@ -3268,10 +3118,10 @@ PS C:\> $BackupJcOrganizationResults.User False - - Users + + IncludeInfo - A switch parameter that when called backs up JumpCloud user information to CSV. + Appends "Info" and "TargetInfo" properties to output. System.Management.Automation.SwitchParameter @@ -3279,432 +3129,111 @@ PS C:\> $BackupJcOrganizationResults.User False - - - - - All - - A switch parameter that when called tells the command to back up JumpCloud user, system user, system, user group, and system group information to CSV files. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - SystemGroups - - A switch parameter that when called backs up JumpCloud system group membership to CSV. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - Systems - - A switch parameter that when called backs up JumpCloud system information to CSV. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - SystemUsers - - A switch parameter that when called backs up JumpCloud system user information to CSV. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - UserGroups - - A switch parameter that when called backs up JumpCloud user group membership to CSV. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - Users - - A switch parameter that when called backs up JumpCloud user information to CSV. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - - - - None - - - - - - - - - - System.Object - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - Get-JCBackup -All - - Backs up JumpCloud user, system user, system, user group, and system group information to CSV files. A CSV backup file will be created for each backup item within the current working directory when this command is run. - - - - -------------------------- Example 2 -------------------------- - Get-JCBackup -Users - - Backs up JumpCloud user information to CSV. A CSV backup file containing all user information will be created within the current working directory when this command is run. - - - - -------------------------- Example 3 -------------------------- - Get-JCBackup -SystemUsers - - Backs up JumpCloud system user information to CSV. A CSV backup file containing all system user information will be created within the current working directory when this command is run. - - - - -------------------------- Example 4 -------------------------- - Get-JCBackup -Systems - - Backs up JumpCloud system information to CSV. A CSV backup file containing all system information will be created within the current working directory when this command is run. - - - - -------------------------- Example 5 -------------------------- - Get-JCBackup -UserGroups - - Backs up JumpCloud user group membership to CSV. A CSV backup file containing all user group information will be created within the current working directory when this command is run. - - - - -------------------------- Example 6 -------------------------- - Get-JCBackup -SystemGroups - - Backs up JumpCloud system group membership to CSV. A CSV backup file containing all system group information will be created within the current working directory when this command is run. - - - - -------------------------- Example 7 -------------------------- - Get-JCBackup -Users -UserGroups - - More then one parameter can be specified at one time. The above example backs up JumpCloud user and user group information to CSV. - - - - - - Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCBackup - - - - - - Get-JCCloudDirectory - Get - JCCloudDirectory - - Returns all Cloud Directory instances within a JumpCloud tenant, a single Cloud Directory instance using the -ID or -Name Parameter, or directories matching a single type using the -Type Parameter. - - - - The Get-JCCloudDirectory function returns all information describing a JumpCloud Cloud Directory instance. To find the contents and payload of a specific instance the -ID or -Name Parameter must be used as this information is only accessible when using this Parameter. The associations for an individual Cloud Directory can also be queried using the -Association Parameter and specifying either 'Users' or 'UserGroups' - - - - Get-JCCloudDirectory - - ID + + IncludeNames - The ID of cloud directory instance + Appends "Name" and "TargetName" properties to output. - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - Type + + IncludeVisualPath - The type of cloud directory + Appends "visualPathById", "visualPathByName", and "visualPathByType" properties to output. - - g_suite - office_365 - - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - - Get-JCCloudDirectory - - Name + + Fields - The name of cloud directory instance + An array of the fields/properties/columns you want to return from the search. - System.String + System.Array - System.String + System.Array None - - Type + + Limit - The type of cloud directory + The number of items you want to return per API call. - - g_suite - office_365 - - System.String + System.Int32 - System.String + System.Int32 None - - - - - ID - - The ID of cloud directory instance - - System.String - - System.String - - - None - - - Name - - The name of cloud directory instance - - System.String - - System.String - - - None - - - Type - - The type of cloud directory - - System.String - - System.String - - - None - - - - - - System.String - - - - - - - - - - System.Object - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> Get-JCCloudDirectory - - Returns all Cloud Directory instances within a JumpCloud tenant - - - - -------------------------- Example 2 -------------------------- - PS C:\> Get-JCCloudDirectory -Type office_365 - - Returns all Office 365 Cloud Directory instances within a JumpCloud tenant - - - - -------------------------- Example 3 -------------------------- - PS C:\> Get-JCCloudDirectory -Name 'JumpCloud Office 365' - - Returns the JumpCloud Office 365 Cloud Directory instance properties - - - - -------------------------- Example 4 -------------------------- - PS C:\> Get-JCCloudDirectory -Name 'JumpCloud Office 365' -Association Users - - Returns the direct and indirect user associations for the JumpCloud Office 365 Cloud Directory instance - - - - -------------------------- Example 5 -------------------------- - PS C:\> Get-JCCloudDirectory -Name 'JumpCloud Office 365' -Association UserGroups - - Returns the direct user group associations for the JumpCloud Office 365 Cloud Directory instance - - - - - - Online Version: - https://github.com/TheJumpCloud/support/wiki/ - - - - - - Get-JCCommand - Get - JCCommand - - Returns all JumpCloud Commands within a JumpCloud tenant or a single JumpCloud Command using the -ByID Parameter. - - - - The Get-JCCommand function returns all information describing a JumpCloud command. To find the contents and payload of a specific command the -ByID Parameter must be used as this information is only accessible when using this Parameter. Note: String parameters are case-insensitive - - - - Get-JCCommand - - CommandID + + Skip - The _id of the JumpCloud command you wish to query. - To find a JumpCloud CommandID run the command: - PS C:\> Get-JCCommand | Select name, _id - The CommandID will be the 24 character string populated for the _id field. - CommandID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandID. This is shown in EXAMPLES 3 and 4. + The number of items you want to skip over per API call. - System.String[] + System.Int32 - System.String[] + System.Int32 None - - ByID - - Use the -ByID parameter when you want to query the contents of a specific command or if the -CommandID is being passed over the pipeline to return the full contents of a JumpCloud command. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which queries one JumpCloud command at a time. - - - System.Management.Automation.SwitchParameter - - - False - - - - Get-JCCommand - - command + + Paginate - The command to execute on the server. + Whether or not you want to paginate through the results. - System.String + + True + False + + System.Boolean - System.String + System.Boolean None - commandType + Force - Command Type + Bypass user prompts and dynamic ValidateSet. - - windows - mac - linux - - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - launchType + + + Get-JCAssociation + + Type - Launch Type + The type of the object. - repeated - one-time - manual - trigger + command + ldap_server + policy + application + radius_server + system_group + system + user_group + user + g_suite + office_365 System.String @@ -3713,30 +3242,35 @@ PS C:\> $BackupJcOrganizationResults.User None - - name + + Name - Name of the command + The name of the object. - System.String + System.String[] - System.String + System.String[] None - - returnProperties + + TargetType - Allows you to return select properties on JumpCloud user objects. Specifying what properties are returned can drastically increase the speed of the API call with a large data set. Valid properties that can be returned are: 'command', 'name','commandType', 'launchType','listensTo','schedule','trigger','scheduleRepeatType','organization' + The type of the target object. + user + user_group + system + system_group + policy command - name - launchType - commandType - trigger - scheduleRepeatType + application + g_suite + ldap_server + office_365 + radius_server System.String[] @@ -3745,44 +3279,131 @@ PS C:\> $BackupJcOrganizationResults.User None - - scheduleRepeatType + + Direct - When the command will repeat + Returns only "Direct" associations. - - minute - hour - day - week - month + + System.Management.Automation.SwitchParameter + + + False + + + Indirect + + Returns only "Indirect" associations. + + + System.Management.Automation.SwitchParameter + + + False + + + IncludeInfo + + Appends "Info" and "TargetInfo" properties to output. + + + System.Management.Automation.SwitchParameter + + + False + + + IncludeNames + + Appends "Name" and "TargetName" properties to output. + + + System.Management.Automation.SwitchParameter + + + False + + + IncludeVisualPath + + Appends "visualPathById", "visualPathByName", and "visualPathByType" properties to output. + + + System.Management.Automation.SwitchParameter + + + False + + + Fields + + An array of the fields/properties/columns you want to return from the search. + + System.Array + + System.Array + + + None + + + Limit + + The number of items you want to return per API call. + + System.Int32 + + System.Int32 + + + None + + + Skip + + The number of items you want to skip over per API call. + + System.Int32 + + System.Int32 + + + None + + + Paginate + + Whether or not you want to paginate through the results. + + + True + False - System.String + System.Boolean - System.String + System.Boolean None - trigger + Force - The name of the command trigger + Bypass user prompts and dynamic ValidateSet. - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - ByID + + Direct - Use the -ByID parameter when you want to query the contents of a specific command or if the -CommandID is being passed over the pipeline to return the full contents of a JumpCloud command. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which queries one JumpCloud command at a time. + Returns only "Direct" associations. System.Management.Automation.SwitchParameter @@ -3791,26 +3412,34 @@ PS C:\> $BackupJcOrganizationResults.User False - - command + + Fields - The command to execute on the server. + An array of the fields/properties/columns you want to return from the search. - System.String + System.Array - System.String + System.Array None - - CommandID + + Force - The _id of the JumpCloud command you wish to query. - To find a JumpCloud CommandID run the command: - PS C:\> Get-JCCommand | Select name, _id - The CommandID will be the 24 character string populated for the _id field. - CommandID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandID. This is shown in EXAMPLES 3 and 4. + Bypass user prompts and dynamic ValidateSet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Id + + The unique id of the object. System.String[] @@ -3819,46 +3448,94 @@ PS C:\> $BackupJcOrganizationResults.User None - - commandType + + IncludeInfo - Command Type + Appends "Info" and "TargetInfo" properties to output. - System.String + System.Management.Automation.SwitchParameter - System.String + System.Management.Automation.SwitchParameter + + + False + + + IncludeNames + + Appends "Name" and "TargetName" properties to output. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + IncludeVisualPath + + Appends "visualPathById", "visualPathByName", and "visualPathByType" properties to output. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Indirect + + Returns only "Indirect" associations. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Limit + + The number of items you want to return per API call. + + System.Int32 + + System.Int32 None - - launchType + + Name - Launch Type + The name of the object. - System.String + System.String[] - System.String + System.String[] None - - name + + Paginate - Name of the command + Whether or not you want to paginate through the results. - System.String + System.Boolean - System.String + System.Boolean None - - returnProperties + + TargetType - Allows you to return select properties on JumpCloud user objects. Specifying what properties are returned can drastically increase the speed of the API call with a large data set. Valid properties that can be returned are: 'command', 'name','commandType', 'launchType','listensTo','schedule','trigger','scheduleRepeatType','organization' + The type of the target object. System.String[] @@ -3867,10 +3544,10 @@ PS C:\> $BackupJcOrganizationResults.User None - - scheduleRepeatType + + Type - When the command will repeat + The type of the object. System.String @@ -3879,14 +3556,14 @@ PS C:\> $BackupJcOrganizationResults.User None - - trigger + + Skip - The name of the command trigger + The number of items you want to skip over per API call. - System.String + System.Int32 - System.String + System.Int32 None @@ -3903,24 +3580,56 @@ PS C:\> $BackupJcOrganizationResults.User - System.String[] + System.Management.Automation.SwitchParameter - - - + - System.Object + System.String[] - - - + + + + System.Array + + + + + + + + System.Int32 + + + + + + + + System.Boolean + + + + + + + + + + System.Object + + + + + + + @@ -3928,75 +3637,96 @@ PS C:\> $BackupJcOrganizationResults.User -------------------------- Example 1 -------------------------- - PS C:\> Get-JCCommand + PS C:\> Get-JCAssociation -Type:user_group -Name:employee -TargetType:users - Returns all JumpCloud Commands populated within the Commands section of the JumpCloud admin console. + List all "users" that are associated with the user_group "employee". -------------------------- Example 2 -------------------------- - PS C:\> Get-JCCommand -CommandID 5j09o6f23dan6f4n035601d5 + PS C:\> Get-JCAssociation -Type:system -Id:5c9a95f84tdo1376318g5148 - Returns a single JumpCloud command with CommandID '5j09o6f23dan6f4n035601d5'. Note that the contents of the command will be present in the output from this command. + List all associations with the system "5c9a95f84tdo1376318g5148". -------------------------- Example 3 -------------------------- - PS C:\> Get-JCCommand | Get-JCCommand -ByID + PS C:\> Get-JCAssociation -Type:system -Id:5c9a95f84tdo1376318g5148 -TargetType:users -Direct - Returns all information describing all JumpCloud commands by passing the -CommandID Parameter to the -ByID Parameter using the pipeline and Parameter Binding. - Note that when running this command the time for the output to display will be directly proportionate to how many JumpCloud commands you have. The command 'Get-JCCommand -ByID' runs once for every JumpCloud command within your tenant. + List all "users" that have a direct association with the system "5c9a95f84tdo1376318g5148". -------------------------- Example 4 -------------------------- - PS C:\> Get-JCCommand -name '*BitLocker*' | Get-JCCommand -ByID + PS C:\> Get-JCAssociation -Type:system -Id:5c9a95f84tdo1376318g5148 -TargetType:users -Indirect - Returns all information describing all JumpCloud commands with a name of ' BitLocker ' by passing the -CommandID Parameter to the -ByID Parameter using the pipeline and Parameter Binding. Note, search parameters on Get-JCCommand support wildcard characters. In this example commands with the string "BitLocker" somewhere in the name would be returned. + List all "users" that have a indirect association with the system "5c9a95f84tdo1376318g5148". -------------------------- Example 5 -------------------------- - PS C:\> Get-JCCommand -launchType 'trigger' | Get-JCCommand -ByID - - Returns all information describing all JumpCloud commands with a launchType of 'trigger' by passing the -CommandID Parameter to the -ByID Parameter using the pipeline and Parameter Binding. - Note that when running this command the time for the output to display will be directly proportionate to how many JumpCloud commands you have with a launchType of 'trigger'. The command 'Get-JCCommand -ByID' runs once for every JumpCloud command within your tenant with a launchType of 'trigger'. LaunchType 'trigger' or 'Trigger' will return the same information due to case-insensitivity - - - - -------------------------- Example 6 -------------------------- - PS C:\> Get-JCCommand -command '*fdesetup*' | Get-JCCommand -ByID + PS C:\> Get-JCAssociation -Type:system -Id:5c9a95f84tdo1376318g5148 -TargetType:users -IncludeInfo -IncludeNames -IncludeVisualPath - Returns all information describing all JumpCloud commands with a command string and the search term " fdesetup ", by passing the -CommandID Parameter to the -ByID Parameter using the pipeline and Parameter Binding. Note, search parameters on Get-JCCommand support wildcard characters. In this example commands with the string "fdesetup" somewhere in the command body would be returned. + List all "users" that are associated with the system "5c9a95f84tdo1376318g5148" and also get additional metadata about each object. Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCCommand + https://github.com/TheJumpCloud/support/wiki/Get-JCAssociation - Get-JCCommandResult + Get-JCBackup Get - JCCommandResult + JCBackup - Returns all JumpCloud Command Results within a JumpCloud tenant or a single JumpCloud Command Result using the -ByID Parameter. + Backs up JumpCloud directory information to CSV - The Get-JCCommandResult function returns all command results within a JumpCloud tenant. To return the command results output the -ByID Parameter must be used as this information is only accessible when using this Parameter. + The Get-JCBackup command saves JumpCloud directory information to CSV files. This command can be used to backup user, system user, system, user group, and system group information to CSV files. Specific items can be selected for CSV backup using the command or the '-All' switch parameter can be specified which will backup all items. How JCBackup works JumpCloud user information can be queried using the JumpCloud PowerShell module command Get-JCUser (https://github.com/TheJumpCloud/support/wiki/Get-JCUser)This command will by default return all JumpCloud user properties. + To export only the JumpCloud user information presented within the JumpCloud admin console ("First Name", "Last Name", "Username" and "Email") use the '-returnProperties' parameter of the Get-JCUser command as shown below. Note JumpCloud unique IDs (_id) are always returned when using the Get-JCUser command. + + Get-JCUser -returnProperties firstname, lastname, username, email | Export-CSV -Path "JumpCloudUsers_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation + + This command will export all JumpCloud users first name, last name, username, id, and email to a CSV file named JumpCloudUsers_CurrentDate.CSV created within the directory where the command is run. + If enforcing UID/GID consistency and you wish to export this information run the following command: + Get-JCUser -returnProperties firstname, lastname, username, email, unix_uid, unix_guid | Export-CSV -Path "JumpCloudUsers_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation + This command will export all JumpCloud users first name, last name, username, id, email, unix_guid, and unix_uid to a CSV file named JumpCloudUsers_CurrentDate.CSV created within the directory where the command is run. + To export all information describing JumpCloud users to CSV some additional object expansion must be done. + The properties "attributes", "addresses", "phonenumbers" and "ssh_keys" of JumpCloud users are returned as nested objects via the JumpCloud PowerShell module. + This means that if the objects are not expanded before exporting to CSV they will simply display as a 'System.Object[]' in the output CSV file. + To account for this find the below example which expands each nested object using PowerShell calculated properties and converts the objects to the JSON format. Note the backtick '`' escape character is used to break this command into multiple lines for readability. + Get-JCUser | Select-Object * , ` @{Name = 'attributes'; Expression = {$_.attributes | ConvertTo-Json}}, ` @{Name = 'addresses'; Expression = {$_.addresses | ConvertTo-Json}}, ` @{Name = 'phonenumbers'; Expression = {$_.phonenumbers | ConvertTo-Json}}, ` @{Name = 'ssh_keys'; Expression = {$_.ssh_keys | ConvertTo-Json}} ` -ExcludeProperty attributes, addresses, phonenumbers, ssh_keys | Export-CSV -Path "JumpCloudUsers_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation + This command will gather and format all JumpCloud user information and export it to a CSV file named JumpCloudUsers_CurrentDate.CSV created within the directory where the command is run. If you wish to exclude certain user properties you can append the '-ExcludeProperty' list with the properties you wish to exclude. Backing up JumpCloud System User Information JumpCloud system user associations can be queried using the JumpCloud PowerShell module command Get-JCSystemUser (https://github.com/TheJumpCloud/support/wiki/Get-JCUser)The Get-JCSystemUser command will show all JumpCloud users associated with a specific JumpCloud System using the JumpCloud System ID. + To export all JumpCloud system user information to CSV use the following example. + The property "BindGroups" is returned as a nested object via the JumpCloud PowerShell module. + This means that if the object is expanded before exporting to CSV it will simply display as a 'System.Object[]' in the output CSV file. + To account for this the "BindGroups" property is expanded using a PowerShell calculated property. + Get-JCSystem | Get-JCSystemUser | Select-Object -Property * , @{Name = 'BindGroups'; Expression = {$ .BindGroups | ConvertTo-Json}} -ExcludeProperty BindGroups | Export-CSV -Path "JumpCloudSystemUsers $(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation + This command will gather and format all JumpCloud system user associations and export them to a CSV file named JumpCloudSystemUsers_CurrentDate.CSV created within the directory where the command is run. Backing up JumpCloud System Information JumpCloud system information can be queried using the JumpCloud PowerShell module command Get-JCSystem (https://github.com/TheJumpCloud/support/wiki/Get-JCSystemUser)This command will by default return all JumpCloud system properties. Note The properties JumpCloud System ID (_id) and lastContact are always returned when using the Get-JCSystem command. + To only return and export specific system properties to CSV use the '-returnProperties' parameter of the Get-JCSystem command. + Get-JCSystem -returnProperties hostname, os, version, serialNumber, remoteIP, systemTimezone | Export-CSV -Path "JumpCloudSystems_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation + This command will export all JumpCloud Systems hostname, os, version, serial number, remoteIP, system time zone, system id, and last conntect time to a CSV file named JumpCloudSystems_CurrentDate.CSV created within the directory where the command is run. + The properties "networkInterfaces" and "sshdParams" of JumpCloud systems are returned as nested objects via the JumpCloud PowerShell module. + This means that if the objects are not expanded before exporting to CSV they will simply display as a 'System.Object[]' in the output CSV file. + To account for this find the below example which expands each nested object using PowerShell calculated properties and converts the objects to the JSON format. Note the back tick '`' escape character is used to break this command into multiple lines for readability. + Get-JCSystem | Select-Object *, ` @{Name = 'networkInterfaces'; Expression = {$_.networkInterfaces | ConvertTo-Json}}, ` @{Name = 'sshdParams'; Expression = {$_.sshdParams | ConvertTo-Json}} ` -ExcludeProperty networkInterfaces, sshdParams, connectionHistory | Export-CSV -Path "JumpCloudSystems_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation + This command will gather and format all JumpCloud system information and export it to a CSV file named JumpCloudSystems_CurrentDate.CSV created within the directory where the command is run. If you wish to exclude certain system properties you can append the '-ExcludeProperty' list with the properties you wish to exclude. Backing up JumpCloud User Groups JumpCloud user group membership can be queried using the JumpCloud PowerShell module command Get-JCUserGroupMember (https://github.com/TheJumpCloud/support/wiki/Get-JCUserGroupMember)Get-JCGroup -Type User | Get-JCUserGroupMember | Export-CSV -Path "JumpCloudUserGroupMembers_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation + This command will save all JumpCloud user groups and the group members to a CSV file named JumpCloudUserGroupMember_CurrentDate.CSV created within the directory where the command is run. Backing up JumpCloud System Groups JumpCloud system group membership can be queried using the JumpCloud PowerShell module command Get-JCSystemGroupMember (https://github.com/TheJumpCloud/support/wiki/Get-JCSystemGroupMember)Get-JCGroup -Type System | Get-JCSystemGroupMember | Export-CSV -Path "JumpCloudSystemGroupMembers_$(Get-Date -Format MMddyyyy).CSV" -NoTypeInformation + This command will save all JumpCloud system groups and the group members to a CSV file named JumpCloudSystemGroupMember_CurrentDate.CSV created within the directory where the command is run. - Get-JCCommandResult - - ByCommandID + Get-JCBackup + + All - Use the -ByCommandID or -ByWorkflowID parameter when you want to query the results of a specific Command. The -ByCommandID or -ByWorkflowID SwitchParameter will set the ParameterSet to 'ByCommandID' which queries all JumpCloud Command Results for that particular Command. + A switch parameter that when called tells the command to back up JumpCloud user, system user, system, user group, and system group information to CSV files. System.Management.Automation.SwitchParameter @@ -4004,40 +3734,32 @@ PS C:\> $BackupJcOrganizationResults.User False - - CommandID + + SystemGroups - The _id of the JumpCloud Command you wish to query. + A switch parameter that when called backs up JumpCloud system group membership to CSV. - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - - Get-JCCommandResult - - CommandResultID + + Systems - The _id of the JumpCloud Command Result you wish to query. + A switch parameter that when called backs up JumpCloud system information to CSV. - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - - Get-JCCommandResult - Detailed + SystemUsers - A switch parameter to return the detailed output of each command result + A switch parameter that when called backs up JumpCloud system user information to CSV. System.Management.Automation.SwitchParameter @@ -4045,13 +3767,21 @@ PS C:\> $BackupJcOrganizationResults.User False - - - Get-JCCommandResult - TotalCount + UserGroups - A switch parameter to only return the number of command results. + A switch parameter that when called backs up JumpCloud user group membership to CSV. + + + System.Management.Automation.SwitchParameter + + + False + + + Users + + A switch parameter that when called backs up JumpCloud user information to CSV. System.Management.Automation.SwitchParameter @@ -4062,10 +3792,10 @@ PS C:\> $BackupJcOrganizationResults.User - - ByCommandID + + All - Use the -ByCommandID or -ByWorkflowID parameter when you want to query the results of a specific Command. The -ByCommandID or -ByWorkflowID SwitchParameter will set the ParameterSet to 'ByCommandID' which queries all JumpCloud Command Results for that particular Command. + A switch parameter that when called tells the command to back up JumpCloud user, system user, system, user group, and system group information to CSV files. System.Management.Automation.SwitchParameter @@ -4074,34 +3804,34 @@ PS C:\> $BackupJcOrganizationResults.User False - - CommandID + + SystemGroups - The _id of the JumpCloud Command you wish to query. + A switch parameter that when called backs up JumpCloud system group membership to CSV. - System.String + System.Management.Automation.SwitchParameter - System.String + System.Management.Automation.SwitchParameter - None + False - - CommandResultID + + Systems - The _id of the JumpCloud Command Result you wish to query. + A switch parameter that when called backs up JumpCloud system information to CSV. - System.String + System.Management.Automation.SwitchParameter - System.String + System.Management.Automation.SwitchParameter - None + False - Detailed + SystemUsers - A switch parameter to return the detailed output of each command result + A switch parameter that when called backs up JumpCloud system user information to CSV. System.Management.Automation.SwitchParameter @@ -4111,9 +3841,9 @@ PS C:\> $BackupJcOrganizationResults.User False - TotalCount + UserGroups - A switch parameter to only return the number of command results. + A switch parameter that when called backs up JumpCloud user group membership to CSV. System.Management.Automation.SwitchParameter @@ -4122,19 +3852,23 @@ PS C:\> $BackupJcOrganizationResults.User False - - - - - System.String - + + Users - + A switch parameter that when called backs up JumpCloud user information to CSV. - - + System.Management.Automation.SwitchParameter System.Management.Automation.SwitchParameter + + + False + + + + + + None @@ -4159,81 +3893,80 @@ PS C:\> $BackupJcOrganizationResults.User -------------------------- Example 1 -------------------------- - PS C:\> Get-JCCommandResult + Get-JCBackup -All - Returns all JumpCloud Commands Results + Backs up JumpCloud user, system user, system, user group, and system group information to CSV files. A CSV backup file will be created for each backup item within the current working directory when this command is run. -------------------------- Example 2 -------------------------- - PS C:\> Get-JCCommandResult -CommandResultID 5m0o65m6i4sb973059omb762 + Get-JCBackup -Users - Returns a single JumpCloud Command Result with CommandResultID '5j09o6f23dan6f4n035601d5'. Note that the command results output will be present in the output from this command. + Backs up JumpCloud user information to CSV. A CSV backup file containing all user information will be created within the current working directory when this command is run. -------------------------- Example 3 -------------------------- - PS C:\> Get-JCCommandResult -CommandID 6307e611baab9f408ff17eb9 + Get-JCBackup -SystemUsers - Returns all JumpCloud Command Result corresponding to the JumpCloud Command with ID: '6307e611baab9f408ff17eb9'. Note that the command results output will be present in the output from this command. + Backs up JumpCloud system user information to CSV. A CSV backup file containing all system user information will be created within the current working directory when this command is run. -------------------------- Example 4 -------------------------- - PS C:\> Get-JCComand -Name "GetJCAgentLog" | Get-JCCommandResult -ByCommandID + Get-JCBackup -Systems - Returns all JumpCloud Commands with the name "GetJCAgentLog", and pipes the output to Get-JCComandResult. The "-ByCommandID" switch will flag the command to get the results for each commandID passed in. Multiple commands can be piped into the function. + Backs up JumpCloud system information to CSV. A CSV backup file containing all system information will be created within the current working directory when this command is run. -------------------------- Example 5 -------------------------- - PS C:\> Get-JCCommandResult | Where-Object {$_.requestTime -GT (Get-Date).AddDays(-7) -and $_.exitCode -ne 0} + Get-JCBackup -UserGroups - Returns all JumpCloud Command Result that were run within the last seven days and that did not return an exitCode of '0'. Note an exitCode of zero generally represents a successful run of a command. This command returns all failed commands results for the past seven days. + Backs up JumpCloud user group membership to CSV. A CSV backup file containing all user group information will be created within the current working directory when this command is run. -------------------------- Example 6 -------------------------- - PS C:\> Get-JCCommandResult -Detailed | Where-Object requestTime -GT (Get-Date).AddHours(-1) | Select-Object -ExpandProperty output + Get-JCBackup -SystemGroups - Returns the output for all JumpCloud Command results that were run within the last hour using the -ByID Parameter and Parameter Binding. - Note that when running this command the time for the output to display will be directly proportionate to how many JumpCloud commands that match the criteria. The command 'Get-JCCommandResult -Detailed' runs once for every JumpCloud command result that matches the criteria Where-Object criteria. + Backs up JumpCloud system group membership to CSV. A CSV backup file containing all system group information will be created within the current working directory when this command is run. -------------------------- Example 7 -------------------------- - PS C:\> Get-JCCommandResult -TotalCount + Get-JCBackup -Users -UserGroups - Returns the total number of JumpCloud command results + More then one parameter can be specified at one time. The above example backs up JumpCloud user and user group information to CSV. Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCCommandResult + https://github.com/TheJumpCloud/support/wiki/Get-JCBackup - Get-JCCommandTarget + Get-JCCloudDirectory Get - JCCommandTarget + JCCloudDirectory - Returns the JumpCloud systems or system groups associated with a JumpCloud command. + Returns all Cloud Directory instances within a JumpCloud tenant, a single Cloud Directory instance using the -ID or -Name Parameter, or directories matching a single type using the -Type Parameter. - Using the CommandID parameter the Get-JCCommandTarget command will return all the systems associated with a JumpCloud command. If the '-Groups' parameter is used the Get-JCCommandTarget command will return all the system groups associated with a JumpCloud command. + The Get-JCCloudDirectory function returns all information describing a JumpCloud Cloud Directory instance. To find the contents and payload of a specific instance the -ID or -Name Parameter must be used as this information is only accessible when using this Parameter. The associations for an individual Cloud Directory can also be queried using the -Association Parameter and specifying either 'Users' or 'UserGroups' - Get-JCCommandTarget - - CommandID + Get-JCCloudDirectory + + ID - The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. + The ID of cloud directory instance System.String @@ -4242,24 +3975,60 @@ PS C:\> $BackupJcOrganizationResults.User None - - Groups + + Type - A switch parameter to display any System Groups associated with a command. + The type of cloud directory + + g_suite + office_365 + + System.String - System.Management.Automation.SwitchParameter + System.String - False + None + + + + Get-JCCloudDirectory + + Name + + The name of cloud directory instance + + System.String + + System.String + + + None + + + Type + + The type of cloud directory + + + g_suite + office_365 + + System.String + + System.String + + + None - - CommandID + + ID - The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. + The ID of cloud directory instance System.String @@ -4268,17 +4037,29 @@ PS C:\> $BackupJcOrganizationResults.User None - - Groups + + Name - A switch parameter to display any System Groups associated with a command. + The name of cloud directory instance - System.Management.Automation.SwitchParameter + System.String - System.Management.Automation.SwitchParameter + System.String - False + None + + + Type + + The type of cloud directory + + System.String + + System.String + + + None @@ -4309,57 +4090,82 @@ PS C:\> $BackupJcOrganizationResults.User -------------------------- Example 1 -------------------------- - Get-JCCommandTarget -CommandID '5a99777710p3690onylo3e1g' + PS C:\> Get-JCCloudDirectory - Retrieves the JumpCloud system targets that are associated the JumpCloud command with the Command ID '5a99777710p3690onylo3e1g' + Returns all Cloud Directory instances within a JumpCloud tenant -------------------------- Example 2 -------------------------- - Get-JCCommandTarget -CommandID '5a99777710p3690onylo3e1g' -Groups + PS C:\> Get-JCCloudDirectory -Type office_365 - Retrieves the JumpCloud system group targets that are associated the JumpCloud command with the Command ID '5a99777710p3690onylo3e1g' + Returns all Office 365 Cloud Directory instances within a JumpCloud tenant + + + + -------------------------- Example 3 -------------------------- + PS C:\> Get-JCCloudDirectory -Name 'JumpCloud Office 365' + + Returns the JumpCloud Office 365 Cloud Directory instance properties + + + + -------------------------- Example 4 -------------------------- + PS C:\> Get-JCCloudDirectory -Name 'JumpCloud Office 365' -Association Users + + Returns the direct and indirect user associations for the JumpCloud Office 365 Cloud Directory instance + + + + -------------------------- Example 5 -------------------------- + PS C:\> Get-JCCloudDirectory -Name 'JumpCloud Office 365' -Association UserGroups + + Returns the direct user group associations for the JumpCloud Office 365 Cloud Directory instance Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCCommandTarget + https://github.com/TheJumpCloud/support/wiki/ - Get-JCEvent + Get-JCCommand Get - JCEvent + JCCommand - Query the API for Directory Insights events + Returns all JumpCloud Commands within a JumpCloud tenant or a single JumpCloud Command using the -ByID Parameter. - Query the API for Directory Insights events + The Get-JCCommand function returns all information describing a JumpCloud command. To find the contents and payload of a specific command the -ByID Parameter must be used as this information is only accessible when using this Parameter. Note: String parameters are case-insensitive - Get-JCEvent - - Body + Get-JCCommand + + CommandID - EventQuery is the users' command to search our auth logs To construct, see NOTES section for BODY properties and create a hash table. + The _id of the JumpCloud command you wish to query. + To find a JumpCloud CommandID run the command: + PS C:\> Get-JCCommand | Select name, _id + The CommandID will be the 24 character string populated for the _id field. + CommandID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandID. This is shown in EXAMPLES 3 and 4. - JumpCloud.SDK.DirectoryInsights.Models.IEventQuery + System.String[] - JumpCloud.SDK.DirectoryInsights.Models.IEventQuery + System.String[] None - - Confirm + + ByID - Prompts you for confirmation before running the cmdlet. + Use the -ByID parameter when you want to query the contents of a specific command or if the -CommandID is being passed over the pipeline to return the full contents of a JumpCloud command. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which queries one JumpCloud command at a time. System.Management.Automation.SwitchParameter @@ -4367,48 +4173,60 @@ PS C:\> $BackupJcOrganizationResults.User False - - WhatIf + + + Get-JCCommand + + command - Shows what would happen if the cmdlet runs. The cmdlet is not run. + The command to execute on the server. + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - - - Get-JCEvent - - EndTime + + commandType - optional query end time, UTC in RFC3339 format + Command Type - System.DateTime + + windows + mac + linux + + System.String - System.DateTime + System.String None - - Fields + + launchType - optional list of fields to return from query + Launch Type - System.String[] + + repeated + one-time + manual + trigger + + System.String - System.String[] + System.String None - - Q + + name - optional string for specifying a full text query + Name of the command System.String @@ -4417,11 +4235,19 @@ PS C:\> $BackupJcOrganizationResults.User None - - SearchAfter + + returnProperties - Specific query to search after, see x-* response headers for next values + Allows you to return select properties on JumpCloud user objects. Specifying what properties are returned can drastically increase the speed of the API call with a large data set. Valid properties that can be returned are: 'command', 'name','commandType', 'launchType','listensTo','schedule','trigger','scheduleRepeatType','organization' + + command + name + launchType + commandType + trigger + scheduleRepeatType + System.String[] System.String[] @@ -4429,143 +4255,56 @@ PS C:\> $BackupJcOrganizationResults.User None - - SearchTermAnd + + scheduleRepeatType - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + When the command will repeat - System.Collections.Hashtable + + minute + hour + day + week + month + + System.String - System.Collections.Hashtable + System.String None - - SearchTermNot + + trigger - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values + The name of the command trigger - System.Collections.Hashtable + System.String - System.Collections.Hashtable + System.String None - - SearchTermOr - - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values - - System.Collections.Hashtable - - System.Collections.Hashtable - - - None - - - Service - - service name to query. Known services: systems,radius,sso,directory,ldap,all - - System.String[] - - System.String[] - - - None - - - Sort - - ASC or DESC order for timestamp - - System.String - - System.String - - - None - - - StartTime - - query start time, UTC in RFC3339 format - - System.DateTime - - System.DateTime - - - None - - - Confirm - - Prompts you for confirmation before running the cmdlet. - - - System.Management.Automation.SwitchParameter - - - False - - - WhatIf - - Shows what would happen if the cmdlet runs. The cmdlet is not run. - - - System.Management.Automation.SwitchParameter - - - False - - - Body - - EventQuery is the users' command to search our auth logs To construct, see NOTES section for BODY properties and create a hash table. - - JumpCloud.SDK.DirectoryInsights.Models.IEventQuery - - JumpCloud.SDK.DirectoryInsights.Models.IEventQuery - - - None - - - EndTime - - optional query end time, UTC in RFC3339 format - - System.DateTime - - System.DateTime - - - None - - Fields + ByID - optional list of fields to return from query + Use the -ByID parameter when you want to query the contents of a specific command or if the -CommandID is being passed over the pipeline to return the full contents of a JumpCloud command. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which queries one JumpCloud command at a time. - System.String[] + System.Management.Automation.SwitchParameter - System.String[] + System.Management.Automation.SwitchParameter - None + False - - Q + + command - optional string for specifying a full text query + The command to execute on the server. System.String @@ -4574,10 +4313,14 @@ PS C:\> $BackupJcOrganizationResults.User None - - SearchAfter + + CommandID - Specific query to search after, see x-* response headers for next values + The _id of the JumpCloud command you wish to query. + To find a JumpCloud CommandID run the command: + PS C:\> Get-JCCommand | Select name, _id + The CommandID will be the 24 character string populated for the _id field. + CommandID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandID. This is shown in EXAMPLES 3 and 4. System.String[] @@ -4586,46 +4329,46 @@ PS C:\> $BackupJcOrganizationResults.User None - - SearchTermAnd + + commandType - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + Command Type - System.Collections.Hashtable + System.String - System.Collections.Hashtable + System.String None - - SearchTermNot + + launchType - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values + Launch Type - System.Collections.Hashtable + System.String - System.Collections.Hashtable + System.String None - - SearchTermOr + + name - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + Name of the command - System.Collections.Hashtable + System.String - System.Collections.Hashtable + System.String None - - Service + + returnProperties - service name to query. Known services: systems,radius,sso,directory,ldap,all + Allows you to return select properties on JumpCloud user objects. Specifying what properties are returned can drastically increase the speed of the API call with a large data set. Valid properties that can be returned are: 'command', 'name','commandType', 'launchType','listensTo','schedule','trigger','scheduleRepeatType','organization' System.String[] @@ -4634,10 +4377,10 @@ PS C:\> $BackupJcOrganizationResults.User None - - Sort + + scheduleRepeatType - ASC or DESC order for timestamp + When the command will repeat System.String @@ -4646,47 +4389,31 @@ PS C:\> $BackupJcOrganizationResults.User None - - StartTime + + trigger - query start time, UTC in RFC3339 format + The name of the command trigger - System.DateTime + System.String - System.DateTime + System.String None - - Confirm - - Prompts you for confirmation before running the cmdlet. - - System.Management.Automation.SwitchParameter + + + - System.Management.Automation.SwitchParameter - + System.String - False - - - WhatIf - Shows what would happen if the cmdlet runs. The cmdlet is not run. + - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - + - JumpCloud.SDK.DirectoryInsights.Models.IEventQuery + System.String[] @@ -4696,7 +4423,7 @@ PS C:\> $BackupJcOrganizationResults.User - JumpCloud.SDK.DirectoryInsights.Models.IPost200ApplicationJsonItemsItem + System.Object @@ -4705,117 +4432,81 @@ PS C:\> $BackupJcOrganizationResults.User - COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - EVENTQUERYBODY <IEventQuery>: EventQuery is the users' command to search our auth logs [EndTime <DateTime?>]: optional query end time, UTC in RFC3339 format [Fields <String[]>]: optional list of fields to return from query [Limit <Int64?>]: Max number of rows to return [SearchAfter <String[]>]: Specific query to search after, see x-* response headers for next values [SearchTermAnd <ISearchTermAnd>]: list of event terms. If all terms match the event will be returned by the service. [(Any) <Object>]: This indicates any property can be added to this object. [SearchTermOr <ISearchTermOr>]: list of event terms. If any term matches, the event will be returned by the service. [(Any) <Object>]: This indicates any property can be added to this object. [Service <String[]>]: service name to query. Known services: systems,radius,sso,directory,ldap,all [Sort <String>]: ASC or DESC order for timestamp [StartTime <DateTime?>]: query start time, UTC in RFC3339 format + - -------------------------- EXAMPLE 1 -------------------------- - (Get-JCEvent -Service:('all') -StartTime:((Get-date).AddDays(-30))) - - Pull all event records from the last thirty days - - - - -------------------------- EXAMPLE 2 -------------------------- - (Get-JCEvent -Service:('directory') -StartTime:((Get-date).AddHours(-1)) -Limit:('10')) - - Get directory results from the last hour limit to the last 10 results in the time range - - - - -------------------------- EXAMPLE 3 -------------------------- - (Get-JCEvent -Service:('directory') -StartTime:((Get-date).AddDays(-30)) -Sort:("DESC") -EndTime:((Get-date).AddDays(-5))) + -------------------------- Example 1 -------------------------- + PS C:\> Get-JCCommand - Get directory results between 30 and 5 days ago, sort timestamp by descending value + Returns all JumpCloud Commands populated within the Commands section of the JumpCloud admin console. - -------------------------- EXAMPLE 4 -------------------------- - (Get-JCEvent -Service:('directory') -StartTime:((Get-date).AddDays(-30)) -Limit:('10') -searchTermAnd:@{"event_type" = "group_create"}) + -------------------------- Example 2 -------------------------- + PS C:\> Get-JCCommand -CommandID 5j09o6f23dan6f4n035601d5 - Get only group_create from the last thirty days + Returns a single JumpCloud command with CommandID '5j09o6f23dan6f4n035601d5'. Note that the contents of the command will be present in the output from this command. - -------------------------- EXAMPLE 5 -------------------------- - (Get-JCEvent -Service:('all') -StartTime:('2020-04-14T00:00:00Z') -EndTime:('2020-04-20T23:00:00Z') -SearchTermOr @{"initiated_by.username" = @("user.1", "user.2")}) + -------------------------- Example 3 -------------------------- + PS C:\> Get-JCCommand | Get-JCCommand -ByID - Get login events initiated by either "user.1" or "user.2" between a universal time zone range + Returns all information describing all JumpCloud commands by passing the -CommandID Parameter to the -ByID Parameter using the pipeline and Parameter Binding. + Note that when running this command the time for the output to display will be directly proportionate to how many JumpCloud commands you have. The command 'Get-JCCommand -ByID' runs once for every JumpCloud command within your tenant. - -------------------------- EXAMPLE 6 -------------------------- - (Get-JCEvent -Service:('all') -StartTime:('2020-04-14T00:00:00Z') -EndTime:('2020-04-20T23:00:00Z') -SearchTermAnd @{"event_type" = "admin_login_attempt"; "resource.email" = "admin.user@adminbizorg.com"}) + -------------------------- Example 4 -------------------------- + PS C:\> Get-JCCommand -name '*BitLocker*' | Get-JCCommand -ByID - Get all events between a date range and match event_type = admin_login_attempt and resource.email = admin.user@adminbizorg.com + Returns all information describing all JumpCloud commands with a name of ' BitLocker ' by passing the -CommandID Parameter to the -ByID Parameter using the pipeline and Parameter Binding. Note, search parameters on Get-JCCommand support wildcard characters. In this example commands with the string "BitLocker" somewhere in the name would be returned. - -------------------------- EXAMPLE 7 -------------------------- - (Get-JCEvent -Service:('sso') -StartTime:('2020-04-14T00:00:00Z') -EndTime:('2020-04-20T23:00:00Z') -SearchTermAnd @{"initiated_by.username" = "user.1"}) + -------------------------- Example 5 -------------------------- + PS C:\> Get-JCCommand -launchType 'trigger' | Get-JCCommand -ByID - Get sso events with the search term initiated_by: username with value "user.1" + Returns all information describing all JumpCloud commands with a launchType of 'trigger' by passing the -CommandID Parameter to the -ByID Parameter using the pipeline and Parameter Binding. + Note that when running this command the time for the output to display will be directly proportionate to how many JumpCloud commands you have with a launchType of 'trigger'. The command 'Get-JCCommand -ByID' runs once for every JumpCloud command within your tenant with a launchType of 'trigger'. LaunchType 'trigger' or 'Trigger' will return the same information due to case-insensitivity - -------------------------- EXAMPLE 8 -------------------------- - (Get-JCEvent -Service:('all') -StartTime:('2020-04-14T00:00:00Z') -EndTime:('2020-04-20T23:00:00Z') -SearchTermAnd @{"event_type" = "organization_update"}) + -------------------------- Example 6 -------------------------- + PS C:\> Get-JCCommand -command '*fdesetup*' | Get-JCCommand -ByID - Get all events filtered by organization_update term between a date range + Returns all information describing all JumpCloud commands with a command string and the search term " fdesetup ", by passing the -CommandID Parameter to the -ByID Parameter using the pipeline and Parameter Binding. Note, search parameters on Get-JCCommand support wildcard characters. In this example commands with the string "fdesetup" somewhere in the command body would be returned. - https://github.com/TheJumpCloud/support/wiki/Get-JCEvent - https://github.com/TheJumpCloud/support/wiki/Get-JCEvent + Online Version: + https://github.com/TheJumpCloud/support/wiki/Get-JCCommand - Get-JCEventCount + Get-JCCommandResult Get - JCEventCount + JCCommandResult - Query the API for a count of matching events + Returns all JumpCloud Command Results within a JumpCloud tenant or a single JumpCloud Command Result using the -ByID Parameter. - Query the API for a count of matching events + The Get-JCCommandResult function returns all command results within a JumpCloud tenant. To return the command results output the -ByID Parameter must be used as this information is only accessible when using this Parameter. - Get-JCEventCount - - Body - - EventQuery is the users' command to search our auth logs To construct, see NOTES section for BODY properties and create a hash table. - - JumpCloud.SDK.DirectoryInsights.Models.IEventQuery - - JumpCloud.SDK.DirectoryInsights.Models.IEventQuery - - - None - - - Confirm - - Prompts you for confirmation before running the cmdlet. - - - System.Management.Automation.SwitchParameter - - - False - - - WhatIf + Get-JCCommandResult + + ByCommandID - Shows what would happen if the cmdlet runs. The cmdlet is not run. + Use the -ByCommandID or -ByWorkflowID parameter when you want to query the results of a specific Command. The -ByCommandID or -ByWorkflowID SwitchParameter will set the ParameterSet to 'ByCommandID' which queries all JumpCloud Command Results for that particular Command. System.Management.Automation.SwitchParameter @@ -4823,37 +4514,10 @@ PS C:\> $BackupJcOrganizationResults.User False - - - Get-JCEventCount - - EndTime - - optional query end time, UTC in RFC3339 format - - System.DateTime - - System.DateTime - - - None - - - Fields - - optional list of fields to return from query - - System.String[] - - System.String[] - - - None - - - Q + + CommandID - optional string for specifying a full text query + The _id of the JumpCloud Command you wish to query. System.String @@ -4862,70 +4526,13 @@ PS C:\> $BackupJcOrganizationResults.User None - - SearchAfter - - Specific query to search after, see x-* response headers for next values - - System.String[] - - System.String[] - - - None - - - SearchTermAnd - - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values - - System.Collections.Hashtable - - System.Collections.Hashtable - - - None - - - SearchTermNot - - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values - - System.Collections.Hashtable - - System.Collections.Hashtable - - - None - - - SearchTermOr - - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values - - System.Collections.Hashtable - - System.Collections.Hashtable - - - None - - - Service - - service name to query. Known services: systems,radius,sso,directory,ldap,all - - System.String[] - - System.String[] - - - None - - - Sort + + + Get-JCCommandResult + + CommandResultID - ASC or DESC order for timestamp + The _id of the JumpCloud Command Result you wish to query. System.String @@ -4934,22 +4541,13 @@ PS C:\> $BackupJcOrganizationResults.User None - - StartTime - - query start time, UTC in RFC3339 format - - System.DateTime - - System.DateTime - - - None - - - Confirm + + + Get-JCCommandResult + + Detailed - Prompts you for confirmation before running the cmdlet. + A switch parameter to return the detailed output of each command result System.Management.Automation.SwitchParameter @@ -4957,10 +4555,13 @@ PS C:\> $BackupJcOrganizationResults.User False - - WhatIf + + + Get-JCCommandResult + + TotalCount - Shows what would happen if the cmdlet runs. The cmdlet is not run. + A switch parameter to only return the number of command results. System.Management.Automation.SwitchParameter @@ -4971,46 +4572,34 @@ PS C:\> $BackupJcOrganizationResults.User - - Body - - EventQuery is the users' command to search our auth logs To construct, see NOTES section for BODY properties and create a hash table. - - JumpCloud.SDK.DirectoryInsights.Models.IEventQuery - - JumpCloud.SDK.DirectoryInsights.Models.IEventQuery - - - None - - - EndTime + + ByCommandID - optional query end time, UTC in RFC3339 format + Use the -ByCommandID or -ByWorkflowID parameter when you want to query the results of a specific Command. The -ByCommandID or -ByWorkflowID SwitchParameter will set the ParameterSet to 'ByCommandID' which queries all JumpCloud Command Results for that particular Command. - System.DateTime + System.Management.Automation.SwitchParameter - System.DateTime + System.Management.Automation.SwitchParameter - None + False - - Fields + + CommandID - optional list of fields to return from query + The _id of the JumpCloud Command you wish to query. - System.String[] + System.String - System.String[] + System.String None - - Q + + CommandResultID - optional string for specifying a full text query + The _id of the JumpCloud Command Result you wish to query. System.String @@ -5020,128 +4609,52 @@ PS C:\> $BackupJcOrganizationResults.User None - SearchAfter + Detailed - Specific query to search after, see x-* response headers for next values + A switch parameter to return the detailed output of each command result - System.String[] + System.Management.Automation.SwitchParameter - System.String[] + System.Management.Automation.SwitchParameter - None + False - SearchTermAnd + TotalCount - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + A switch parameter to only return the number of command results. - System.Collections.Hashtable + System.Management.Automation.SwitchParameter - System.Collections.Hashtable + System.Management.Automation.SwitchParameter - None + False - - SearchTermNot + + + + + System.String + - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values + - System.Collections.Hashtable + + - System.Collections.Hashtable - + System.Management.Automation.SwitchParameter - None - - - SearchTermOr - TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + - System.Collections.Hashtable + + + + - System.Collections.Hashtable - - - None - - - Service - - service name to query. Known services: systems,radius,sso,directory,ldap,all - - System.String[] - - System.String[] - - - None - - - Sort - - ASC or DESC order for timestamp - - System.String - - System.String - - - None - - - StartTime - - query start time, UTC in RFC3339 format - - System.DateTime - - System.DateTime - - - None - - - Confirm - - Prompts you for confirmation before running the cmdlet. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - WhatIf - - Shows what would happen if the cmdlet runs. The cmdlet is not run. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - - - - JumpCloud.SDK.DirectoryInsights.Models.IEventQuery - - - - - - - - - - System.Int64 + System.Object @@ -5150,76 +4663,88 @@ PS C:\> $BackupJcOrganizationResults.User - COMPLEX PARAMETER PROPERTIES - To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - BODY <IEventQuery>: EventQuery is the users' command to search our auth logs Service <String[]>: service name to query. Known services: systems,radius,sso,directory,ldap,all StartTime <DateTime>: query start time, UTC in RFC3339 format [EndTime <DateTime?>]: optional query end time, UTC in RFC3339 format [Fields <String[]>]: optional list of fields to return from query [Limit <Int64?>]: Max number of rows to return [SearchAfter <String[]>]: Specific query to search after, see x-* response headers for next values [SearchTermAnd <ISearchTermAnd>]: list of event terms. If all terms match the event will be returned by the service. [(Any) <Object>]: This indicates any property can be added to this object. [SearchTermOr <ISearchTermOr>]: list of event terms. If any term matches, the event will be returned by the service. [(Any) <Object>]: This indicates any property can be added to this object. [Sort <String>]: ASC or DESC order for timestamp + - -------------------------- EXAMPLE 1 -------------------------- - Get-JCEventCount -Service:('all') -StartTime:((Get-date).AddDays(-30)) + -------------------------- Example 1 -------------------------- + PS C:\> Get-JCCommandResult - Pull all event records from a specified time and count the results + Returns all JumpCloud Commands Results - -------------------------- EXAMPLE 2 -------------------------- - Get-JCEventCount -Service:('sso') -StartTime:('2020-04-14T00:00:00Z') + -------------------------- Example 2 -------------------------- + PS C:\> Get-JCCommandResult -CommandResultID 5m0o65m6i4sb973059omb762 - Pull all SSO event records from a specified time and count the results + Returns a single JumpCloud Command Result with CommandResultID '5j09o6f23dan6f4n035601d5'. Note that the command results output will be present in the output from this command. - -------------------------- EXAMPLE 3 -------------------------- - Get-JCEventCount -Service:('all') -StartTime:('2020-04-14T00:00:00Z') -EndTime:('2020-04-20T23:00:00Z') -SearchTermAnd @{"event_type" = "admin_login_attempt"; "resource.email" = "admin.user@adminbizorg.com"} + -------------------------- Example 3 -------------------------- + PS C:\> Get-JCCommandResult -CommandID 6307e611baab9f408ff17eb9 - Get all events counts between a date range and match event_type = admin_login_attempt and resource.email = admin.user@adminbizorg.com + Returns all JumpCloud Command Result corresponding to the JumpCloud Command with ID: '6307e611baab9f408ff17eb9'. Note that the command results output will be present in the output from this command. - -------------------------- EXAMPLE 4 -------------------------- - Get-JCEventCount -Service:('directory') -StartTime:((Get-date).AddDays(-30)) -searchTermAnd:@{"event_type" = "group_create"} + -------------------------- Example 4 -------------------------- + PS C:\> Get-JCComand -Name "GetJCAgentLog" | Get-JCCommandResult -ByCommandID - Get only group_create event counts the last thirty days + Returns all JumpCloud Commands with the name "GetJCAgentLog", and pipes the output to Get-JCComandResult. The "-ByCommandID" switch will flag the command to get the results for each commandID passed in. Multiple commands can be piped into the function. + + + + -------------------------- Example 5 -------------------------- + PS C:\> Get-JCCommandResult | Where-Object {$_.requestTime -GT (Get-Date).AddDays(-7) -and $_.exitCode -ne 0} + + Returns all JumpCloud Command Result that were run within the last seven days and that did not return an exitCode of '0'. Note an exitCode of zero generally represents a successful run of a command. This command returns all failed commands results for the past seven days. + + + + -------------------------- Example 6 -------------------------- + PS C:\> Get-JCCommandResult -Detailed | Where-Object requestTime -GT (Get-Date).AddHours(-1) | Select-Object -ExpandProperty output + + Returns the output for all JumpCloud Command results that were run within the last hour using the -ByID Parameter and Parameter Binding. + Note that when running this command the time for the output to display will be directly proportionate to how many JumpCloud commands that match the criteria. The command 'Get-JCCommandResult -Detailed' runs once for every JumpCloud command result that matches the criteria Where-Object criteria. + + + + -------------------------- Example 7 -------------------------- + PS C:\> Get-JCCommandResult -TotalCount + + Returns the total number of JumpCloud command results Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCEventCount - - - https://github.com/TheJumpCloud/jcapi-powershell/tree/master/SDKs/PowerShell/jumpcloud.sdk.directoryinsights/get-jcsdkeventcount - https://github.com/TheJumpCloud/jcapi-powershell/tree/master/SDKs/PowerShell/jumpcloud.sdk.directoryinsights/get-jcsdkeventcount + https://github.com/TheJumpCloud/support/wiki/Get-JCCommandResult - Get-JCGroup + Get-JCCommandTarget Get - JCGroup + JCCommandTarget - Returns all JumpCloud System and User Groups. + Returns the JumpCloud systems or system groups associated with a JumpCloud command. - The Get-JCGroup function by default will return all JumpCloud System and User groups. By using the -Type Parameter you can choose to return either System or User groups. + Using the CommandID parameter the Get-JCCommandTarget command will return all the systems associated with a JumpCloud command. If the '-Groups' parameter is used the Get-JCCommandTarget command will return all the system groups associated with a JumpCloud command. - Get-JCGroup - - Type + Get-JCCommandTarget + + CommandID - The type of JumpCloud group you want to return. Note there are only two options - User and System. + The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. - - User - System - System.String System.String @@ -5227,25 +4752,24 @@ PS C:\> $BackupJcOrganizationResults.User None - - Name + + Groups - Enter the group name + A switch parameter to display any System Groups associated with a command. - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - Name + + CommandID - Enter the group name + The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. System.String @@ -5254,17 +4778,17 @@ PS C:\> $BackupJcOrganizationResults.User None - - Type + + Groups - The type of JumpCloud group you want to return. Note there are only two options - User and System. + A switch parameter to display any System Groups associated with a command. - System.String + System.Management.Automation.SwitchParameter - System.String + System.Management.Automation.SwitchParameter - None + False @@ -5295,118 +4819,94 @@ PS C:\> $BackupJcOrganizationResults.User -------------------------- Example 1 -------------------------- - PS C:\> Get-JCGroup + Get-JCCommandTarget -CommandID '5a99777710p3690onylo3e1g' - Returns all JumpCloud User and System groups + Retrieves the JumpCloud system targets that are associated the JumpCloud command with the Command ID '5a99777710p3690onylo3e1g' -------------------------- Example 2 -------------------------- - PS C:\> Get-JCGroup -Type User - - Returns all JumpCloud User groups - - - - -------------------------- Example 3 -------------------------- - PS C:\> Get-JCGroup -Type System - - Returns all JumpCloud System groups - - - - -------------------------- Example 4 -------------------------- - PS C:\> Get-JCGroup -Type User -Name 'The Band' + Get-JCCommandTarget -CommandID '5a99777710p3690onylo3e1g' -Groups - Returns the JumpCloud user group 'The Band' and the posixGroups information descripting this group + Retrieves the JumpCloud system group targets that are associated the JumpCloud command with the Command ID '5a99777710p3690onylo3e1g' Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCGroup + https://github.com/TheJumpCloud/support/wiki/Get-JCCommandTarget - Get-JCOrganization + Get-JCEvent Get - JCOrganization + JCEvent - Returns all JumpCloud organizations associated with the authenticated JumpCloud admins account. + Query the API for Directory Insights events - The Get-JCOrganization command displays all JumpCloud organizations associated with the authenticated JumpCloud admins. JumpCloud admins configured for multi tenant administration can see the Organizations they have access to and the displayName and JumpCloudOrgID for these accounts. + Query the API for Directory Insights events - Get-JCOrganization + Get-JCEvent + + Body + + EventQuery is the users' command to search our auth logs To construct, see NOTES section for BODY properties and create a hash table. + + JumpCloud.SDK.DirectoryInsights.Models.IEventQuery + + JumpCloud.SDK.DirectoryInsights.Models.IEventQuery + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + - - - - - - None - - - - - - - - - - System.Object - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - Get-JCOrganization - - Displays the JumpCloud organizations associated with the authenticated JumpCloud admin. - - - - - - Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCOrganization - - - - - - Get-JCPolicy - Get - JCPolicy - - Returns all JumpCloud Policies within a JumpCloud tenant. - - - - The Get-JCPolicy function returns all information describing JumpCloud policies within a JumpCloud tenant. - - - Get-JCPolicy - - PolicyID + Get-JCEvent + + EndTime - The PolicyID of the JumpCloud policy you wish to query. + optional query end time, UTC in RFC3339 format + + System.DateTime + + System.DateTime + + + None + + + Fields + + optional list of fields to return from query System.String[] @@ -5416,23 +4916,69 @@ PS C:\> $BackupJcOrganizationResults.User None - ByID + Q - Use the -ByID parameter when you want to query a specific policy. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which queries one JumpCloud policy at a time. + optional string for specifying a full text query + System.String - System.Management.Automation.SwitchParameter + System.String - False + None - - - Get-JCPolicy - Name + SearchAfter - The Name of the JumpCloud policy you wish to query. + Specific query to search after, see x-* response headers for next values + + System.String[] + + System.String[] + + + None + + + SearchTermAnd + + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + + System.Collections.Hashtable + + System.Collections.Hashtable + + + None + + + SearchTermNot + + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values + + System.Collections.Hashtable + + System.Collections.Hashtable + + + None + + + SearchTermOr + + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + + System.Collections.Hashtable + + System.Collections.Hashtable + + + None + + + Service + + service name to query. Known services: systems,radius,sso,directory,ldap,all System.String[] @@ -5441,25 +4987,83 @@ PS C:\> $BackupJcOrganizationResults.User None + + Sort + + ASC or DESC order for timestamp + + System.String + + System.String + + + None + + + StartTime + + query start time, UTC in RFC3339 format + + System.DateTime + + System.DateTime + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + Body + + EventQuery is the users' command to search our auth logs To construct, see NOTES section for BODY properties and create a hash table. + + JumpCloud.SDK.DirectoryInsights.Models.IEventQuery + + JumpCloud.SDK.DirectoryInsights.Models.IEventQuery + + + None + - ByID + EndTime - Use the -ByID parameter when you want to query a specific policy. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which queries one JumpCloud policy at a time. + optional query end time, UTC in RFC3339 format - System.Management.Automation.SwitchParameter + System.DateTime - System.Management.Automation.SwitchParameter + System.DateTime - False + None - Name + Fields - The Name of the JumpCloud policy you wish to query. + optional list of fields to return from query System.String[] @@ -5468,105 +5072,249 @@ PS C:\> $BackupJcOrganizationResults.User None - - PolicyID + + Q - The PolicyID of the JumpCloud policy you wish to query. + optional string for specifying a full text query - System.String[] + System.String - System.String[] + System.String None - - - + + SearchAfter + + Specific query to search after, see x-* response headers for next values + + System.String[] System.String[] + + None + + + SearchTermAnd - + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values - - - - + System.Collections.Hashtable - System.Object + System.Collections.Hashtable + + None + + + SearchTermNot - + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values - - - - - - + System.Collections.Hashtable + + System.Collections.Hashtable + + + None + + + SearchTermOr + + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + + System.Collections.Hashtable + + System.Collections.Hashtable + + + None + + + Service + + service name to query. Known services: systems,radius,sso,directory,ldap,all + + System.String[] + + System.String[] + + + None + + + Sort + + ASC or DESC order for timestamp + + System.String + + System.String + + + None + + + StartTime + + query start time, UTC in RFC3339 format + + System.DateTime + + System.DateTime + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + JumpCloud.SDK.DirectoryInsights.Models.IEventQuery + + + + + + + + + + JumpCloud.SDK.DirectoryInsights.Models.IPost200ApplicationJsonItemsItem + + + + + + + + + COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + EVENTQUERYBODY <IEventQuery>: EventQuery is the users' command to search our auth logs [EndTime <DateTime?>]: optional query end time, UTC in RFC3339 format [Fields <String[]>]: optional list of fields to return from query [Limit <Int64?>]: Max number of rows to return [SearchAfter <String[]>]: Specific query to search after, see x-* response headers for next values [SearchTermAnd <ISearchTermAnd>]: list of event terms. If all terms match the event will be returned by the service. [(Any) <Object>]: This indicates any property can be added to this object. [SearchTermOr <ISearchTermOr>]: list of event terms. If any term matches, the event will be returned by the service. [(Any) <Object>]: This indicates any property can be added to this object. [Service <String[]>]: service name to query. Known services: systems,radius,sso,directory,ldap,all [Sort <String>]: ASC or DESC order for timestamp [StartTime <DateTime?>]: query start time, UTC in RFC3339 format + - -------------------------- Example 1 -------------------------- - PS C:\> Get-JCPolicy + -------------------------- EXAMPLE 1 -------------------------- + (Get-JCEvent -Service:('all') -StartTime:((Get-date).AddDays(-30))) - Returns all JumpCloud Policies populated within the Policies section of the JumpCloud admin console. + Pull all event records from the last thirty days - -------------------------- Example 2 -------------------------- - PS C:\> Get-JCPolicy -PolicyID 123456789 + -------------------------- EXAMPLE 2 -------------------------- + (Get-JCEvent -Service:('directory') -StartTime:((Get-date).AddHours(-1)) -Limit:('10')) - Returns the policy associated to the id of 123456789. + Get directory results from the last hour limit to the last 10 results in the time range - -------------------------- Example 3 -------------------------- - PS C:\> Get-JCPolicy -Name 'HelloWorld' + -------------------------- EXAMPLE 3 -------------------------- + (Get-JCEvent -Service:('directory') -StartTime:((Get-date).AddDays(-30)) -Sort:("DESC") -EndTime:((Get-date).AddDays(-5))) - Returns the HelloWorld policy. + Get directory results between 30 and 5 days ago, sort timestamp by descending value + + + + -------------------------- EXAMPLE 4 -------------------------- + (Get-JCEvent -Service:('directory') -StartTime:((Get-date).AddDays(-30)) -Limit:('10') -searchTermAnd:@{"event_type" = "group_create"}) + + Get only group_create from the last thirty days + + + + -------------------------- EXAMPLE 5 -------------------------- + (Get-JCEvent -Service:('all') -StartTime:('2020-04-14T00:00:00Z') -EndTime:('2020-04-20T23:00:00Z') -SearchTermOr @{"initiated_by.username" = @("user.1", "user.2")}) + + Get login events initiated by either "user.1" or "user.2" between a universal time zone range + + + + -------------------------- EXAMPLE 6 -------------------------- + (Get-JCEvent -Service:('all') -StartTime:('2020-04-14T00:00:00Z') -EndTime:('2020-04-20T23:00:00Z') -SearchTermAnd @{"event_type" = "admin_login_attempt"; "resource.email" = "admin.user@adminbizorg.com"}) + + Get all events between a date range and match event_type = admin_login_attempt and resource.email = admin.user@adminbizorg.com + + + + -------------------------- EXAMPLE 7 -------------------------- + (Get-JCEvent -Service:('sso') -StartTime:('2020-04-14T00:00:00Z') -EndTime:('2020-04-20T23:00:00Z') -SearchTermAnd @{"initiated_by.username" = "user.1"}) + + Get sso events with the search term initiated_by: username with value "user.1" + + + + -------------------------- EXAMPLE 8 -------------------------- + (Get-JCEvent -Service:('all') -StartTime:('2020-04-14T00:00:00Z') -EndTime:('2020-04-20T23:00:00Z') -SearchTermAnd @{"event_type" = "organization_update"}) + + Get all events filtered by organization_update term between a date range - Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCPolicy + https://github.com/TheJumpCloud/support/wiki/Get-JCEvent + https://github.com/TheJumpCloud/support/wiki/Get-JCEvent - Get-JCPolicyResult + Get-JCEventCount Get - JCPolicyResult + JCEventCount - Returns all JumpCloud results for a given policy within a JumpCloud tenant. + Query the API for a count of matching events - The Get-JCPolicyResult function returns the latest policy result information from a JumpCloud policy. You can search by a specific policy name to return results from the policy being applied. You can also search by a specific systemId to find the latest policy result for a specific system. + Query the API for a count of matching events - Get-JCPolicyResult - - PolicyID + Get-JCEventCount + + Body - The PolicyID of the JumpCloud policy you wish to query. + EventQuery is the users' command to search our auth logs To construct, see NOTES section for BODY properties and create a hash table. - System.String + JumpCloud.SDK.DirectoryInsights.Models.IEventQuery - System.String + JumpCloud.SDK.DirectoryInsights.Models.IEventQuery None - - ByPolicyID + + Confirm - The -ByPolicyID switch parameter will enforce the ByPolicyID parameter set and improve performance of gathering multiple policy results via the pipeline when the input object contains a property with PolicyID. + Prompts you for confirmation before running the cmdlet. System.Management.Automation.SwitchParameter @@ -5574,13 +5322,10 @@ PS C:\> $BackupJcOrganizationResults.User False - - - Get-JCPolicyResult - - BySystemID + + WhatIf - The -BySystemID switch parameter will enforce the BySystemID parameter set and search for results by SystemID. + Shows what would happen if the cmdlet runs. The cmdlet is not run. System.Management.Automation.SwitchParameter @@ -5588,40 +5333,37 @@ PS C:\> $BackupJcOrganizationResults.User False - - SystemID + + + Get-JCEventCount + + EndTime - The SystemID of the JumpCloud system you wish to query the latest policy result of. + optional query end time, UTC in RFC3339 format - System.String + System.DateTime - System.String + System.DateTime None - - - Get-JCPolicyResult - - PolicyName + + Fields - The PolicyName of the JumpCloud policy you wish to query. + optional list of fields to return from query - System.String + System.String[] - System.String + System.String[] None - - - Get-JCPolicyResult - PolicyResultID + Q - The PolicyResultID of the JumpCloud policy result you wish to query. + optional string for specifying a full text query System.String @@ -5630,61 +5372,155 @@ PS C:\> $BackupJcOrganizationResults.User None - - - - - ByPolicyID - - The -ByPolicyID switch parameter will enforce the ByPolicyID parameter set and improve performance of gathering multiple policy results via the pipeline when the input object contains a property with PolicyID. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - BySystemID - - The -BySystemID switch parameter will enforce the BySystemID parameter set and search for results by SystemID. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False + + SearchAfter + + Specific query to search after, see x-* response headers for next values + + System.String[] + + System.String[] + + + None + + + SearchTermAnd + + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + + System.Collections.Hashtable + + System.Collections.Hashtable + + + None + + + SearchTermNot + + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values + + System.Collections.Hashtable + + System.Collections.Hashtable + + + None + + + SearchTermOr + + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + + System.Collections.Hashtable + + System.Collections.Hashtable + + + None + + + Service + + service name to query. Known services: systems,radius,sso,directory,ldap,all + + System.String[] + + System.String[] + + + None + + + Sort + + ASC or DESC order for timestamp + + System.String + + System.String + + + None + + + StartTime + + query start time, UTC in RFC3339 format + + System.DateTime + + System.DateTime + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + Body + + EventQuery is the users' command to search our auth logs To construct, see NOTES section for BODY properties and create a hash table. + + JumpCloud.SDK.DirectoryInsights.Models.IEventQuery + + JumpCloud.SDK.DirectoryInsights.Models.IEventQuery + + + None - - PolicyID + + EndTime - The PolicyID of the JumpCloud policy you wish to query. + optional query end time, UTC in RFC3339 format - System.String + System.DateTime - System.String + System.DateTime None - - PolicyName + + Fields - The PolicyName of the JumpCloud policy you wish to query. + optional list of fields to return from query - System.String + System.String[] - System.String + System.String[] None - PolicyResultID + Q - The PolicyResultID of the JumpCloud policy result you wish to query. + optional string for specifying a full text query System.String @@ -5693,10 +5529,70 @@ PS C:\> $BackupJcOrganizationResults.User None - - SystemID + + SearchAfter - The SystemID of the JumpCloud system you wish to query the latest policy result of. + Specific query to search after, see x-* response headers for next values + + System.String[] + + System.String[] + + + None + + + SearchTermAnd + + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + + System.Collections.Hashtable + + System.Collections.Hashtable + + + None + + + SearchTermNot + + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the objectfor future-proof-nessand a list of sub-values + + System.Collections.Hashtable + + System.Collections.Hashtable + + + None + + + SearchTermOr + + TermConjunction represents a conjunction (and/or)NOTE: the validator limits what the operator can be, not the object for future-proof-ness and a list of sub-values + + System.Collections.Hashtable + + System.Collections.Hashtable + + + None + + + Service + + service name to query. Known services: systems,radius,sso,directory,ldap,all + + System.String[] + + System.String[] + + + None + + + Sort + + ASC or DESC order for timestamp System.String @@ -5705,19 +5601,47 @@ PS C:\> $BackupJcOrganizationResults.User None - - - + + StartTime + + query start time, UTC in RFC3339 format + + System.DateTime - System.String + System.DateTime + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + False + + + WhatIf - + Shows what would happen if the cmdlet runs. The cmdlet is not run. - - + System.Management.Automation.SwitchParameter System.Management.Automation.SwitchParameter + + + False + + + + + + JumpCloud.SDK.DirectoryInsights.Models.IEventQuery @@ -5727,7 +5651,7 @@ PS C:\> $BackupJcOrganizationResults.User - System.Object + System.Int64 @@ -5736,59 +5660,76 @@ PS C:\> $BackupJcOrganizationResults.User - - + COMPLEX PARAMETER PROPERTIES + To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + BODY <IEventQuery>: EventQuery is the users' command to search our auth logs Service <String[]>: service name to query. Known services: systems,radius,sso,directory,ldap,all StartTime <DateTime>: query start time, UTC in RFC3339 format [EndTime <DateTime?>]: optional query end time, UTC in RFC3339 format [Fields <String[]>]: optional list of fields to return from query [Limit <Int64?>]: Max number of rows to return [SearchAfter <String[]>]: Specific query to search after, see x-* response headers for next values [SearchTermAnd <ISearchTermAnd>]: list of event terms. If all terms match the event will be returned by the service. [(Any) <Object>]: This indicates any property can be added to this object. [SearchTermOr <ISearchTermOr>]: list of event terms. If any term matches, the event will be returned by the service. [(Any) <Object>]: This indicates any property can be added to this object. [Sort <String>]: ASC or DESC order for timestamp + - -------------------------- Example 1 -------------------------- - PS C:\> Get-JCPolicyResult 'HelloWorld' + -------------------------- EXAMPLE 1 -------------------------- + Get-JCEventCount -Service:('all') -StartTime:((Get-date).AddDays(-30)) - Returns the latest policy result for the HelloWorld policy. + Pull all event records from a specified time and count the results - -------------------------- Example 2 -------------------------- - PS C:\> Get-JCPolicyResult -PolicyId 123456789 + -------------------------- EXAMPLE 2 -------------------------- + Get-JCEventCount -Service:('sso') -StartTime:('2020-04-14T00:00:00Z') - Returns the latest policy result for the policy with the id of 123456789. + Pull all SSO event records from a specified time and count the results - -------------------------- Example 3 -------------------------- - PS C:\> Get-JCPolicyResult -SystemID 123456789 + -------------------------- EXAMPLE 3 -------------------------- + Get-JCEventCount -Service:('all') -StartTime:('2020-04-14T00:00:00Z') -EndTime:('2020-04-20T23:00:00Z') -SearchTermAnd @{"event_type" = "admin_login_attempt"; "resource.email" = "admin.user@adminbizorg.com"} - Returns the latest policy result for a system with the id of 123456789. + Get all events counts between a date range and match event_type = admin_login_attempt and resource.email = admin.user@adminbizorg.com + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-JCEventCount -Service:('directory') -StartTime:((Get-date).AddDays(-30)) -searchTermAnd:@{"event_type" = "group_create"} + + Get only group_create event counts the last thirty days Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCPolicyResult + https://github.com/TheJumpCloud/support/wiki/Get-JCEventCount + + + https://github.com/TheJumpCloud/jcapi-powershell/tree/master/SDKs/PowerShell/jumpcloud.sdk.directoryinsights/get-jcsdkeventcount + https://github.com/TheJumpCloud/jcapi-powershell/tree/master/SDKs/PowerShell/jumpcloud.sdk.directoryinsights/get-jcsdkeventcount - Get-JCPolicyTargetGroup + Get-JCGroup Get - JCPolicyTargetGroup + JCGroup - Returns all bound groups associated with a JumpCloud Policy within a JumpCloud tenant. + Returns all JumpCloud System and User Groups. - The Get-JCPolicyTargetGroup returns information about all bound groups associated with a JumpCloud Policy within a JumpCloud tenant. + The Get-JCGroup function by default will return all JumpCloud System and User groups. By using the -Type Parameter you can choose to return either System or User groups. - Get-JCPolicyTargetGroup - - PolicyName + Get-JCGroup + + Type - The Name of the JumpCloud policy you wish to query. + The type of JumpCloud group you want to return. Note there are only two options - User and System. + + User + System + System.String System.String @@ -5796,24 +5737,10 @@ PS C:\> $BackupJcOrganizationResults.User None - - ByName - - Use the -ByName parameter when you want to query a specific policy. The -ByName SwitchParameter will set the ParameterSet to 'ByName' which queries one JumpCloud policy at a time. - - - System.Management.Automation.SwitchParameter - - - False - - - - Get-JCPolicyTargetGroup - - PolicyID + + Name - The PolicyID of the JumpCloud policy you wish to query. + Enter the group name System.String @@ -5825,22 +5752,10 @@ PS C:\> $BackupJcOrganizationResults.User - - ByName - - Use the -ByName parameter when you want to query a specific policy. The -ByName SwitchParameter will set the ParameterSet to 'ByName' which queries one JumpCloud policy at a time. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - PolicyID + + Name - The PolicyID of the JumpCloud policy you wish to query. + Enter the group name System.String @@ -5849,10 +5764,10 @@ PS C:\> $BackupJcOrganizationResults.User None - - PolicyName + + Type - The Name of the JumpCloud policy you wish to query. + The type of JumpCloud group you want to return. Note there are only two options - User and System. System.String @@ -5890,64 +5805,130 @@ PS C:\> $BackupJcOrganizationResults.User -------------------------- Example 1 -------------------------- - PS C:\> Get-JCPolicyTargetGroup -PolicyId 123456789 + PS C:\> Get-JCGroup - Returns the bound groups associated for a policy with the id of 123456789. + Returns all JumpCloud User and System groups -------------------------- Example 2 -------------------------- - PS C:\> Get-JCPolicyTargetGroup -PolicyName 'HelloWorld' + PS C:\> Get-JCGroup -Type User - Returns the bound groups associated for a policy with the name of HelloWorld. + Returns all JumpCloud User groups -------------------------- Example 3 -------------------------- - PS C:\> Get-JCPolicy | Get-JCPolicyTargetGroup + PS C:\> Get-JCGroup -Type System - Returns all policies within a JumpCloud tenant and the bound groups associated to those policies. + Returns all JumpCloud System groups + + + + -------------------------- Example 4 -------------------------- + PS C:\> Get-JCGroup -Type User -Name 'The Band' + + Returns the JumpCloud user group 'The Band' and the posixGroups information descripting this group Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCPolicyTargetGroup + https://github.com/TheJumpCloud/support/wiki/Get-JCGroup - Get-JCPolicyTargetSystem + Get-JCOrganization Get - JCPolicyTargetSystem + JCOrganization - Returns all bound systems associated with a JumpCloud Policy within a JumpCloud tenant. + Returns all JumpCloud organizations associated with the authenticated JumpCloud admins account. - The Get-JCPolicyTargetSystem returns information about all bound systems associated with a JumpCloud Policy within a JumpCloud tenant. + The Get-JCOrganization command displays all JumpCloud organizations associated with the authenticated JumpCloud admins. JumpCloud admins configured for multi tenant administration can see the Organizations they have access to and the displayName and JumpCloudOrgID for these accounts. - Get-JCPolicyTargetSystem - - PolicyName + Get-JCOrganization + + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Get-JCOrganization + + Displays the JumpCloud organizations associated with the authenticated JumpCloud admin. + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/Get-JCOrganization + + + + + + Get-JCPolicy + Get + JCPolicy + + Returns all JumpCloud Policies within a JumpCloud tenant. + + + + The Get-JCPolicy function returns all information describing JumpCloud policies within a JumpCloud tenant. + + + + Get-JCPolicy + + PolicyID - The Name of the JumpCloud policy you wish to query. + The PolicyID of the JumpCloud policy you wish to query. - System.String + System.String[] - System.String + System.String[] None - ByName + ByID - Use the -ByName parameter when you want to query a specific policy. The -ByName SwitchParameter will set the ParameterSet to 'ByName' which queries one JumpCloud policy at a time. + Use the -ByID parameter when you want to query a specific policy. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which queries one JumpCloud policy at a time. System.Management.Automation.SwitchParameter @@ -5957,15 +5938,15 @@ PS C:\> $BackupJcOrganizationResults.User - Get-JCPolicyTargetSystem - - PolicyID + Get-JCPolicy + + Name - The PolicyID of the JumpCloud policy you wish to query. + The Name of the JumpCloud policy you wish to query. - System.String + System.String[] - System.String + System.String[] None @@ -5974,9 +5955,9 @@ PS C:\> $BackupJcOrganizationResults.User - ByName + ByID - Use the -ByName parameter when you want to query a specific policy. The -ByName SwitchParameter will set the ParameterSet to 'ByName' which queries one JumpCloud policy at a time. + Use the -ByID parameter when you want to query a specific policy. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which queries one JumpCloud policy at a time. System.Management.Automation.SwitchParameter @@ -5985,26 +5966,26 @@ PS C:\> $BackupJcOrganizationResults.User False - - PolicyID + + Name - The PolicyID of the JumpCloud policy you wish to query. + The Name of the JumpCloud policy you wish to query. - System.String + System.String[] - System.String + System.String[] None - - PolicyName + + PolicyID - The Name of the JumpCloud policy you wish to query. + The PolicyID of the JumpCloud policy you wish to query. - System.String + System.String[] - System.String + System.String[] None @@ -6013,7 +5994,7 @@ PS C:\> $BackupJcOrganizationResults.User - System.String + System.String[] @@ -6038,52 +6019,119 @@ PS C:\> $BackupJcOrganizationResults.User -------------------------- Example 1 -------------------------- - PS C:\> Get-JCPolicyTargetSystem -PolicyId 123456789 + PS C:\> Get-JCPolicy - Returns the bound Systems associated for a policy with the id of 123456789. + Returns all JumpCloud Policies populated within the Policies section of the JumpCloud admin console. -------------------------- Example 2 -------------------------- - PS C:\> Get-JCPolicyTargetSystem -PolicyName 'HelloWorld' + PS C:\> Get-JCPolicy -PolicyID 123456789 - Returns the bound Systems associated for a policy with the name of HelloWorld. + Returns the policy associated to the id of 123456789. -------------------------- Example 3 -------------------------- - PS C:\> Get-JCPolicy | Get-JCPolicyTargetSystem + PS C:\> Get-JCPolicy -Name 'HelloWorld' - Returns all policies within a JumpCloud tenant and the bound systems associated to those policies. + Returns the HelloWorld policy. Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCPolicyTargetSystem + https://github.com/TheJumpCloud/support/wiki/Get-JCPolicy - Get-JCRadiusReplyAttribute + Get-JCPolicyResult Get - JCRadiusReplyAttribute + JCPolicyResult - Returns the Radius reply attributes associated with a JumpCloud user group. + Returns all JumpCloud results for a given policy within a JumpCloud tenant. - Returns the Radius reply attributes associated with a JumpCloud user group. User authentication Radius requests will return with the Radius reply attributes configured on the JumpCloud user groups which associates the user to JumpCloud Radius. Any RADIUS reply attributes configured on a JumpCloud user group which associates a user to a RADIUS server will be returned in the Access-Accept message sent to the endpoint configured to authenticate with JumpCloud Radius. If a user is a member of more then one JumpCloud user group associated with a given RADIUS server all Reply attributes for the groups that associate the user to the RADIUS server will be returned in the Access-Accept message. If a user is a member of more then one JumpCloud user group associated with a given RADIUS server and these groups are configured with conflicting RADIUS reply attributes then the values of the attributes for the group that was created most recently will be returned in the Access-Accept message. RADIUS reply attribute conflicts are resolved based on the creation date of the user group where groups that are created more recently take precedent over older groups. Conflicts occur when groups are configured with the same RADIUS reply attributes and have conflicting attribute values. RADIUS reply attributes with the same attribute names but different tag values do not create conflicts. + The Get-JCPolicyResult function returns the latest policy result information from a JumpCloud policy. You can search by a specific policy name to return results from the policy being applied. You can also search by a specific systemId to find the latest policy result for a specific system. - Get-JCRadiusReplyAttribute + Get-JCPolicyResult + + PolicyID + + The PolicyID of the JumpCloud policy you wish to query. + + System.String + + System.String + + + None + + + ByPolicyID + + The -ByPolicyID switch parameter will enforce the ByPolicyID parameter set and improve performance of gathering multiple policy results via the pipeline when the input object contains a property with PolicyID. + + + System.Management.Automation.SwitchParameter + + + False + + + + Get-JCPolicyResult + + BySystemID + + The -BySystemID switch parameter will enforce the BySystemID parameter set and search for results by SystemID. + + + System.Management.Automation.SwitchParameter + + + False + + + SystemID + + The SystemID of the JumpCloud system you wish to query the latest policy result of. + + System.String + + System.String + + + None + + + + Get-JCPolicyResult - GroupName + PolicyName - The JumpCloud user group to query for Radius attributes. + The PolicyName of the JumpCloud policy you wish to query. + + System.String + + System.String + + + None + + + + Get-JCPolicyResult + + PolicyResultID + + The PolicyResultID of the JumpCloud policy result you wish to query. System.String @@ -6095,10 +6143,70 @@ PS C:\> $BackupJcOrganizationResults.User + + ByPolicyID + + The -ByPolicyID switch parameter will enforce the ByPolicyID parameter set and improve performance of gathering multiple policy results via the pipeline when the input object contains a property with PolicyID. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + BySystemID + + The -BySystemID switch parameter will enforce the BySystemID parameter set and search for results by SystemID. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + PolicyID + + The PolicyID of the JumpCloud policy you wish to query. + + System.String + + System.String + + + None + - GroupName + PolicyName - The JumpCloud user group to query for Radius attributes. + The PolicyName of the JumpCloud policy you wish to query. + + System.String + + System.String + + + None + + + PolicyResultID + + The PolicyResultID of the JumpCloud policy result you wish to query. + + System.String + + System.String + + + None + + + SystemID + + The SystemID of the JumpCloud system you wish to query the latest policy result of. System.String @@ -6117,6 +6225,14 @@ PS C:\> $BackupJcOrganizationResults.User + + + System.Management.Automation.SwitchParameter + + + + + @@ -6136,206 +6252,93 @@ PS C:\> $BackupJcOrganizationResults.User -------------------------- Example 1 -------------------------- - Get-JCRadiusReplyAttribute -GroupName BoulderOffice + PS C:\> Get-JCPolicyResult 'HelloWorld' - Returns the Radius reply attributes associated with the JumpCloud user group 'BoulderOffice'. + Returns the latest policy result for the HelloWorld policy. + + + + -------------------------- Example 2 -------------------------- + PS C:\> Get-JCPolicyResult -PolicyId 123456789 + + Returns the latest policy result for the policy with the id of 123456789. + + + + -------------------------- Example 3 -------------------------- + PS C:\> Get-JCPolicyResult -SystemID 123456789 + + Returns the latest policy result for a system with the id of 123456789. Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCRadiusReplyAttribute + https://github.com/TheJumpCloud/support/wiki/Get-JCPolicyResult - Get-JCRadiusServer + Get-JCPolicyTargetGroup Get - JCRadiusServer + JCPolicyTargetGroup - Return JumpCloud radius server information. + Returns all bound groups associated with a JumpCloud Policy within a JumpCloud tenant. - Use this function to return radius servers from JumpCloud tenet. + The Get-JCPolicyTargetGroup returns information about all bound groups associated with a JumpCloud Policy within a JumpCloud tenant. - Get-JCRadiusServer - - Id - - The unique id of the object. - - System.String[] - - System.String[] - - - None - - - Fields - - An array of the fields/properties/columns you want to return from the search. - - System.Array - - System.Array - - - None - - - Limit + Get-JCPolicyTargetGroup + + PolicyName - The number of items you want to return per API call. + The Name of the JumpCloud policy you wish to query. - System.Int32 + System.String - System.Int32 + System.String None - - Skip + + ByName - The number of items you want to skip over per API call. + Use the -ByName parameter when you want to query a specific policy. The -ByName SwitchParameter will set the ParameterSet to 'ByName' which queries one JumpCloud policy at a time. - System.Int32 - System.Int32 + System.Management.Automation.SwitchParameter - None + False - - Paginate + + + Get-JCPolicyTargetGroup + + PolicyID - Whether or not you want to paginate through the results. + The PolicyID of the JumpCloud policy you wish to query. - - True - False - - System.Boolean + System.String - System.Boolean + System.String None - - Force - - Bypass user prompts and dynamic ValidateSet. - - - System.Management.Automation.SwitchParameter - - - False - - - - Get-JCRadiusServer - - Name - - The name of the object. - - System.String[] - - System.String[] - - - None - - - Fields - - An array of the fields/properties/columns you want to return from the search. - - System.Array - - System.Array - - - None - - - Limit - - The number of items you want to return per API call. - - System.Int32 - - System.Int32 - - - None - - - Skip - - The number of items you want to skip over per API call. - - System.Int32 - - System.Int32 - - - None - - - Paginate - - Whether or not you want to paginate through the results. - - - True - False - - System.Boolean - - System.Boolean - - - None - - - Force - - Bypass user prompts and dynamic ValidateSet. - - - System.Management.Automation.SwitchParameter - - - False - - - Fields - - An array of the fields/properties/columns you want to return from the search. - - System.Array - - System.Array - - - None - - - Force + + ByName - Bypass user prompts and dynamic ValidateSet. + Use the -ByName parameter when you want to query a specific policy. The -ByName SwitchParameter will set the ParameterSet to 'ByName' which queries one JumpCloud policy at a time. System.Management.Automation.SwitchParameter @@ -6344,84 +6347,32 @@ PS C:\> $BackupJcOrganizationResults.User False - - Id - - The unique id of the object. - - System.String[] - - System.String[] - - - None - - - Limit - - The number of items you want to return per API call. - - System.Int32 - - System.Int32 - - - None - - - Name - - The name of the object. - - System.String[] - - System.String[] - - - None - - - Paginate + + PolicyID - Whether or not you want to paginate through the results. + The PolicyID of the JumpCloud policy you wish to query. - System.Boolean + System.String - System.Boolean + System.String None - - Skip + + PolicyName - The number of items you want to skip over per API call. + The Name of the JumpCloud policy you wish to query. - System.Int32 + System.String - System.Int32 + System.String None - - - System.Management.Automation.SwitchParameter - - - - - - - - System.String[] - - - - - System.String @@ -6430,30 +6381,6 @@ PS C:\> $BackupJcOrganizationResults.User - - - System.Array - - - - - - - - System.Int32 - - - - - - - - System.Boolean - - - - - @@ -6473,53 +6400,52 @@ PS C:\> $BackupJcOrganizationResults.User -------------------------- Example 1 -------------------------- - PS C:\> Get-JCRadiusServer + PS C:\> Get-JCPolicyTargetGroup -PolicyId 123456789 - Returns all radius servers from a JumpCloud tenet. + Returns the bound groups associated for a policy with the id of 123456789. -------------------------- Example 2 -------------------------- - PS C:\> Get-JCRadiusServer -Id:('5d6802c46eb05c5971151558') + PS C:\> Get-JCPolicyTargetGroup -PolicyName 'HelloWorld' - Returns a radius server by Id from a JumpCloud tenet. + Returns the bound groups associated for a policy with the name of HelloWorld. -------------------------- Example 3 -------------------------- - PS C:\> Get-JCRadiusServer -Name:('RadiusServer1') + PS C:\> Get-JCPolicy | Get-JCPolicyTargetGroup - Returns a radius server by Name from a JumpCloud tenet. + Returns all policies within a JumpCloud tenant and the bound groups associated to those policies. Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCRadiusServer + https://github.com/TheJumpCloud/support/wiki/Get-JCPolicyTargetGroup - Get-JCSystem + Get-JCPolicyTargetSystem Get - JCSystem + JCPolicyTargetSystem - Returns all JumpCloud Systems within a JumpCloud tenant or a single JumpCloud System using the -ByID Parameter. + Returns all bound systems associated with a JumpCloud Policy within a JumpCloud tenant. - The Get-JCSystem function returns all information describing a JumpCloud system. By default this will return all Systems. - Note: String parameters are case-insensitive + The Get-JCPolicyTargetSystem returns information about all bound systems associated with a JumpCloud Policy within a JumpCloud tenant. - Get-JCSystem - - hostname + Get-JCPolicyTargetSystem + + PolicyName - A search filter to search systems by the hostname. + The Name of the JumpCloud policy you wish to query. System.String @@ -6528,22 +6454,24 @@ PS C:\> $BackupJcOrganizationResults.User None - - active + + ByName - Filter for systems that are online or offline. + Use the -ByName parameter when you want to query a specific policy. The -ByName SwitchParameter will set the ParameterSet to 'ByName' which queries one JumpCloud policy at a time. - System.Boolean - System.Boolean + System.Management.Automation.SwitchParameter - None + False - - agentVersion + + + Get-JCPolicyTargetSystem + + PolicyID - A search filter to search systems by the agentVersion. + The PolicyID of the JumpCloud policy you wish to query. System.String @@ -6552,225 +6480,283 @@ PS C:\> $BackupJcOrganizationResults.User None - - allowMultiFactorAuthentication - - A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication - - System.Boolean - - System.Boolean - - - None - - - allowPublicKeyAuthentication + + + + + ByName + + Use the -ByName parameter when you want to query a specific policy. The -ByName SwitchParameter will set the ParameterSet to 'ByName' which queries one JumpCloud policy at a time. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + PolicyID + + The PolicyID of the JumpCloud policy you wish to query. + + System.String + + System.String + + + None + + + PolicyName + + The Name of the JumpCloud policy you wish to query. + + System.String + + System.String + + + None + + + + + + System.String + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Get-JCPolicyTargetSystem -PolicyId 123456789 + + Returns the bound Systems associated for a policy with the id of 123456789. + + + + -------------------------- Example 2 -------------------------- + PS C:\> Get-JCPolicyTargetSystem -PolicyName 'HelloWorld' + + Returns the bound Systems associated for a policy with the name of HelloWorld. + + + + -------------------------- Example 3 -------------------------- + PS C:\> Get-JCPolicy | Get-JCPolicyTargetSystem + + Returns all policies within a JumpCloud tenant and the bound systems associated to those policies. + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/Get-JCPolicyTargetSystem + + + + + + Get-JCRadiusReplyAttribute + Get + JCRadiusReplyAttribute + + Returns the Radius reply attributes associated with a JumpCloud user group. + + + + Returns the Radius reply attributes associated with a JumpCloud user group. User authentication Radius requests will return with the Radius reply attributes configured on the JumpCloud user groups which associates the user to JumpCloud Radius. Any RADIUS reply attributes configured on a JumpCloud user group which associates a user to a RADIUS server will be returned in the Access-Accept message sent to the endpoint configured to authenticate with JumpCloud Radius. If a user is a member of more then one JumpCloud user group associated with a given RADIUS server all Reply attributes for the groups that associate the user to the RADIUS server will be returned in the Access-Accept message. If a user is a member of more then one JumpCloud user group associated with a given RADIUS server and these groups are configured with conflicting RADIUS reply attributes then the values of the attributes for the group that was created most recently will be returned in the Access-Accept message. RADIUS reply attribute conflicts are resolved based on the creation date of the user group where groups that are created more recently take precedent over older groups. Conflicts occur when groups are configured with the same RADIUS reply attributes and have conflicting attribute values. RADIUS reply attributes with the same attribute names but different tag values do not create conflicts. + + + + Get-JCRadiusReplyAttribute + + GroupName - A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication + The JumpCloud user group to query for Radius attributes. - System.Boolean + System.String - System.Boolean + System.String None - - allowSshPasswordAuthentication + + + + + GroupName + + The JumpCloud user group to query for Radius attributes. + + System.String + + System.String + + + None + + + + + + System.String + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Get-JCRadiusReplyAttribute -GroupName BoulderOffice + + Returns the Radius reply attributes associated with the JumpCloud user group 'BoulderOffice'. + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/Get-JCRadiusReplyAttribute + + + + + + Get-JCRadiusServer + Get + JCRadiusServer + + Return JumpCloud radius server information. + + + + Use this function to return radius servers from JumpCloud tenet. + + + + Get-JCRadiusServer + + Id - A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication + The unique id of the object. - System.Boolean + System.String[] - System.Boolean + System.String[] None - - allowSshRootLogin + + Fields - A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication + An array of the fields/properties/columns you want to return from the search. - System.Boolean + System.Array - System.Boolean + System.Array None - - arch + + Limit - A search filter to search systems by the processor arch. + The number of items you want to return per API call. - System.String + System.Int32 - System.String + System.Int32 None - - date + + Skip - Date to filter on. + The number of items you want to skip over per API call. - System.DateTime + System.Int32 - System.DateTime + System.Int32 None - - dateFilter + + Paginate - Condition to filter date on. + Whether or not you want to paginate through the results. - before - after + True + False - System.String + System.Boolean - System.String + System.Boolean None - description + Force - A search filter to search systems by the description. + Bypass user prompts and dynamic ValidateSet. - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - displayName - - A search filter to search systems by the displayName. - - System.String - - System.String - - - None - - - filterDateProperty - - A parameter that can filter on the property 'created' or 'lastContact'. Only inactive systems will be returned when using the lastContact filter. This parameter if used creates two more dynamic parameters 'dateFilter' and 'date'. See EXAMPLE 5 above for full syntax. - - - created - lastContact - - System.String - - System.String - - - None - - - hasServiceAccount - - A search filter to show macOS systems that have the JumpCloud service account - - System.Boolean - - System.Boolean - - - None - - - modifySSHDConfig - - A search filter to show systems that are enabled ($true) or disabled ($true) for modifySSHDConfig - - System.Boolean - - System.Boolean - - - None - - - os - - A search filter to search systems by the OS. - - System.String - - System.String - - - None - - - remoteIP - - A search filter to search systems by the remoteIP. - - System.String - - System.String - - - None - - - returnProperties + + + Get-JCRadiusServer + + Name - Allows you to return select properties on JumpCloud system objects. Specifying what properties are returned can drastically increase the speed of the API call with a large data set. Valid properties that can be returned are: 'created', 'active', 'agentVersion', 'allowMultiFactorAuthentication', 'allowPublicKeyAuthentication', 'allowSshPasswordAuthentication', 'allowSshRootLogin', 'arch', 'created', 'displayName', 'hostname', 'lastContact', 'modifySSHDConfig', 'organization', 'os', 'remoteIP', 'serialNumber', 'sshdParams', 'systemTimezone', 'templateName', 'version' + The name of the object. - - acknowledged - active - agentVersion - allowMultiFactorAuthentication - allowPublicKeyAuthentication - allowSshPasswordAuthentication - allowSshRootLogin - arch - azureAdJoined - connectionHistory - created - displayName - domainInfo - fde - fileSystem - hasServiceAccount - hostname - lastContact - mdm - modifySSHDConfig - networkInterfaces - organization - os - osFamily - provisionMetadata - remoteIP - serialNumber - serviceAccountState - sshdParams - systemInsights - systemTimezone - systemToken - templateName - userMetrics - usernameHashes - version - System.String[] System.String[] @@ -6778,89 +6764,62 @@ PS C:\> $BackupJcOrganizationResults.User None - - serialNumber - - A search filter to search systems by the serialNumber. - - System.String - - System.String - - - None - - - systemTimezone - - A search filter to search systems by the serialNumber. This field DOES NOT take wildcard input. - - System.String - - System.String - - - None - - - templateName + + Fields - A search filter to search systems by the templateName. + An array of the fields/properties/columns you want to return from the search. - System.String + System.Array - System.String + System.Array None - - version + + Limit - A search filter to search systems by the version. + The number of items you want to return per API call. - System.String + System.Int32 - System.String + System.Int32 None - - - Get-JCSystem - - date + + Skip - Date to filter on. + The number of items you want to skip over per API call. - System.DateTime + System.Int32 - System.DateTime + System.Int32 None - - dateFilter + + Paginate - Condition to filter date on. + Whether or not you want to paginate through the results. - before - after + True + False - System.String + System.Boolean - System.String + System.Boolean None - SystemFDEKey + Force - A switch parameter to reveal the SystemFDEKey + Bypass user prompts and dynamic ValidateSet. System.Management.Automation.SwitchParameter @@ -6868,193 +6827,73 @@ PS C:\> $BackupJcOrganizationResults.User False - - SystemID - - The _id or id of the System which you want to query. - - System.String - - System.String - - - None - - - active + + Fields - Filter for systems that are online or offline. + An array of the fields/properties/columns you want to return from the search. - System.Boolean + System.Array - System.Boolean + System.Array None - agentVersion + Force - A search filter to search systems by the agentVersion. + Bypass user prompts and dynamic ValidateSet. - System.String + System.Management.Automation.SwitchParameter - System.String + System.Management.Automation.SwitchParameter - None + False - - allowMultiFactorAuthentication + + Id - A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication + The unique id of the object. - System.Boolean + System.String[] - System.Boolean + System.String[] None - - allowPublicKeyAuthentication + + Limit - A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication + The number of items you want to return per API call. - System.Boolean + System.Int32 - System.Boolean + System.Int32 None - - allowSshPasswordAuthentication + + Name - A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication + The name of the object. - System.Boolean + System.String[] - System.Boolean - - - None - - - allowSshRootLogin - - A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication - - System.Boolean - - System.Boolean - - - None - - - arch - - A search filter to search systems by the processor arch. - - System.String - - System.String - - - None - - - date - - Date to filter on. - - System.DateTime - - System.DateTime - - - None - - - dateFilter - - Condition to filter date on. - - System.String - - System.String - - - None - - - description - - A search filter to search systems by the description. - - System.String - - System.String - - - None - - - displayName - - A search filter to search systems by the displayName. - - System.String - - System.String - - - None - - - filterDateProperty - - A parameter that can filter on the property 'created' or 'lastContact'. Only inactive systems will be returned when using the lastContact filter. This parameter if used creates two more dynamic parameters 'dateFilter' and 'date'. See EXAMPLE 5 above for full syntax. - - System.String - - System.String - - - None - - - hasServiceAccount - - A search filter to show macOS systems that have the JumpCloud service account - - System.Boolean - - System.Boolean - - - None - - - hostname - - A search filter to search systems by the hostname. - - System.String - - System.String + System.String[] None - - modifySSHDConfig + + Paginate - A search filter to show systems that are enabled ($true) or disabled ($true) for modifySSHDConfig + Whether or not you want to paginate through the results. System.Boolean @@ -7063,116 +6902,36 @@ PS C:\> $BackupJcOrganizationResults.User None - - os - - A search filter to search systems by the OS. - - System.String - - System.String - - - None - - - remoteIP - - A search filter to search systems by the remoteIP. - - System.String - - System.String - - - None - - - returnProperties - - Allows you to return select properties on JumpCloud system objects. Specifying what properties are returned can drastically increase the speed of the API call with a large data set. Valid properties that can be returned are: 'created', 'active', 'agentVersion', 'allowMultiFactorAuthentication', 'allowPublicKeyAuthentication', 'allowSshPasswordAuthentication', 'allowSshRootLogin', 'arch', 'created', 'displayName', 'hostname', 'lastContact', 'modifySSHDConfig', 'organization', 'os', 'remoteIP', 'serialNumber', 'sshdParams', 'systemTimezone', 'templateName', 'version' - - System.String[] - - System.String[] - - - None - - - serialNumber + + Skip - A search filter to search systems by the serialNumber. + The number of items you want to skip over per API call. - System.String + System.Int32 - System.String + System.Int32 None - - SystemFDEKey - - A switch parameter to reveal the SystemFDEKey - - System.Management.Automation.SwitchParameter + + + System.Management.Automation.SwitchParameter - - - False - - - SystemID - - The _id or id of the System which you want to query. - - System.String - - System.String - - - None - - - systemTimezone - - A search filter to search systems by the serialNumber. This field DOES NOT take wildcard input. - - System.String - - System.String - - None - - - templateName - A search filter to search systems by the templateName. + - System.String + + - System.String - + System.String[] - None - - - version - A search filter to search systems by the version. + - System.String - - System.String - - - None - - - + System.String @@ -7183,7 +6942,7 @@ PS C:\> $BackupJcOrganizationResults.User - System.Management.Automation.SwitchParameter + System.Array @@ -7191,7 +6950,7 @@ PS C:\> $BackupJcOrganizationResults.User - System.Boolean + System.Int32 @@ -7199,7 +6958,7 @@ PS C:\> $BackupJcOrganizationResults.User - System.String[] + System.Boolean @@ -7224,80 +6983,53 @@ PS C:\> $BackupJcOrganizationResults.User -------------------------- Example 1 -------------------------- - Get-JCSystem + PS C:\> Get-JCRadiusServer - Returns all JumpCloud managed systems and the information describing these systems. + Returns all radius servers from a JumpCloud tenet. -------------------------- Example 2 -------------------------- - Get-JCSystemUser -SystemID 5n0795a712704la4eve154r + PS C:\> Get-JCRadiusServer -Id:('5d6802c46eb05c5971151558') - Returns a single JumpCloud System with SystemID '5n0795a712704la4eve154r'. + Returns a radius server by Id from a JumpCloud tenet. -------------------------- Example 3 -------------------------- - Get-JCSystem -active $true - - Returns all active JumpCloud Systems and the information describing these systems. - - - - -------------------------- Example 4 -------------------------- - Get-JCSystem -agentVersion '0.9.6*' -os '*Mac*' - - Returns all JumpCloud systems where the agentVersion is '0.9.6. ' and the operating system is like ' Mac*' - - - - -------------------------- Example 5 -------------------------- - Get-JCSystem -filterDateProperty created -dateFilter after -date 01/01/2018 + PS C:\> Get-JCRadiusServer -Name:('RadiusServer1') - Returns all JumpCloud systems that were created after 01/01/2018 using the parameter -filterDateProperty and the dynamic parameters -dateFilter and -date - - - - -------------------------- Example 6 -------------------------- - Get-JCSystem -returnProperties remoteIP, active - - Returns all JumpCloud systems and the properties remoteIP and active. The default properties that return are lastContact and _id. - - - - -------------------------- Example 7 -------------------------- - Get-JCSystem -hostname thisjchost - - Returns JumpCloud system with hostname 'thisjchost' NOTE: String parameters are case-insensitive. Hostname 'thisjchost' and 'thisJcHost' will return the same information. + Returns a radius server by Name from a JumpCloud tenet. Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCSystem + https://github.com/TheJumpCloud/support/wiki/Get-JCRadiusServer - Get-JCSystemApp + Get-JCSystem Get - JCSystemApp + JCSystem - Returns the applications/programs/linux packages installed on JumpCloud managed system(s). This function queries separate system insights tables to get data for macOS/windows/linux devices. + Returns all JumpCloud Systems within a JumpCloud tenant or a single JumpCloud System using the -ByID Parameter. - Get-JCSystem app function helps admins identify what applications/programs or linux packages exist on their JumpCloud managed systems. + The Get-JCSystem function returns all information describing a JumpCloud system. By default this will return all Systems. + Note: String parameters are case-insensitive - Get-JCSystemApp - - name + Get-JCSystem + + hostname - The name of the application you want to search for ex. (Jumpcloud, Slack). Name will always query the "name" property from system insights. Note, for macOS systems, ".app" will be applied. This field is case sensitive. + A search filter to search systems by the hostname. System.String @@ -7306,21 +7038,22 @@ PS C:\> $BackupJcOrganizationResults.User None - - Search + + active - Search for a specific application by from all systems in the org ex. (Get-JCSystemApp -Search -Name "Jumpcloud") THIS PARAMETER DOES NOT TAKE INPUT + Filter for systems that are online or offline. + System.Boolean - System.Management.Automation.SwitchParameter + System.Boolean - False + None - - SystemID + + agentVersion - The System Id of the JumpCloud system you want to search for applications + A search filter to search systems by the agentVersion. System.String @@ -7330,201 +7063,57 @@ PS C:\> $BackupJcOrganizationResults.User None - SystemOS + allowMultiFactorAuthentication - The type (windows, mac, linux) of the JumpCloud Command you wish to search ex. (Windows, macOs, Linux)) + A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication - - Windows - macOS - Linux - - System.String + System.Boolean - System.String + System.Boolean None - - version + + allowPublicKeyAuthentication - The version of the application you want to search for ex. 1.1.2. Note: on Windows/ Linux devices, this parameter will filter on the 'version' property, for macOS applications this parameter will filter on the 'bundleShortVersion' property. + A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication - System.String + System.Boolean - System.String + System.Boolean None - - - - - name - - The name of the application you want to search for ex. (Jumpcloud, Slack). Name will always query the "name" property from system insights. Note, for macOS systems, ".app" will be applied. This field is case sensitive. - - System.String - - System.String - - - None - - - Search - - Search for a specific application by from all systems in the org ex. (Get-JCSystemApp -Search -Name "Jumpcloud") THIS PARAMETER DOES NOT TAKE INPUT - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - SystemID - - The System Id of the JumpCloud system you want to search for applications - - System.String - - System.String - - - None - - - SystemOS - - The type (windows, mac, linux) of the JumpCloud Command you wish to search ex. (Windows, macOs, Linux)) - - System.String - - System.String - - - None - - - version - - The version of the application you want to search for ex. 1.1.2. Note: on Windows/ Linux devices, this parameter will filter on the 'version' property, for macOS applications this parameter will filter on the 'bundleShortVersion' property. - - System.String - - System.String - - - None - - - - - - System.String - - - - - - - - - - System.Object - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> Get-JCSystemApp -SystemId '6363237ec991136ae59892e4' - - Returns the applications installed in the system with the given -SystemId - - - - -------------------------- Example 2 -------------------------- - PS C:\> Get-JCSystemApp -SystemOs 'macOS' - - Returns the 'macOS' systems and all the applications installed for each system - - - - -------------------------- Example 3 -------------------------- - PS C:\> Get-JCSystemApp -SystemOs 'macOS' -Name 'Jumpcloud' - - - - - - -------------------------- Example 4 -------------------------- - PS C:\> Get-JCSystemApp -SystemOs 'macOS' -Name 'Jumpcloud' -Version 'v1.16.2' - - Returns the 'macOS' systems that have a 'Jumpcloud' tray application with the version 'v1.16.2' - - - - -------------------------- Example 5 -------------------------- - PS C:\> Get-JCSystemApp -Name 'jumpcloud' -Search - - Returns any 'jumpcloud' software installed in all the OS systems (Windows/Linux/macOS) - - - - - - Online Version: - https://github.com/TheJumpCloud/support/wiki/ - - - - - - Get-JCSystemGroupMember - Get - JCSystemGroupMember - - Returns the System Group members of a JumpCloud System Group. - - - - The Get-JCSystemGroupMember function returns all the System Group members of a JumpCloud System Group. - - - - Get-JCSystemGroupMember - - ByID + + allowSshPasswordAuthentication - If searching for a System Group using the GroupID populate the GroupID in the -ByID field. + A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication - System.String + System.Boolean - System.String + System.Boolean None - - - Get-JCSystemGroupMember - - GroupName + + allowSshRootLogin - The name of the JumpCloud System Group you want to return the members of. + A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication + + System.Boolean + + System.Boolean + + + None + + + arch + + A search filter to search systems by the processor arch. System.String @@ -7533,132 +7122,38 @@ PS C:\> $BackupJcOrganizationResults.User None - - - - - ByID - - If searching for a System Group using the GroupID populate the GroupID in the -ByID field. - - System.String - - System.String - - - None - - - GroupName - - The name of the JumpCloud System Group you want to return the members of. - - System.String - - System.String - - - None - - - - - - System.String - - - - - - - - - - System.Object - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> Get-JCSystemGroupMember -GroupName 'OSX Group' - - Returns the JumpCloud Systems that are a member of the group 'OSX Group' - - - - -------------------------- Example 2 -------------------------- - PS C:\> Get-JCGroup -Type System | Get-JCSystemGroupMember - - Returns all JumpCloud System Groups and their System members. - - - - -------------------------- Example 3 -------------------------- - PS C:\> Get-JCGroup -Type System | Get-JCSystemGroupMember | Where-Object System -EQ 'Server01' - - Returns all JumpCloud System Groups that the system with a hostname of 'Server01' is a member of. - - - - - - Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCSystemGroupMember - - - - - - Get-JCSystemInsights - Get - JCSystemInsights - - JumpCloud's System Insights feature provides admins with the ability to easily interrogate their fleet of systems to find important pieces of information. Using this function you can easily gather heightened levels of information from your fleet of JumpCloud managed systems. - - - - Using Get-JCSystemInsights will allow you to easily query JumpCloud's RESTful API to return information from your fleet of JumpCloud managed systems. - - - - Get-JCSystemInsights - - Filter + + date - Filters to narrow down search. + Date to filter on. - System.String[] + System.DateTime - System.String[] + System.DateTime None - - SystemId + + dateFilter - A comma separated list of System IDs to query against. + Condition to filter date on. - System.String[] + + before + after + + System.String - System.String[] + System.String None - - Table + + description - Name of the SystemInsights Table to query. See docs.jumpcloud.com for list of available Table endpoints. + A search filter to search systems by the description. System.String @@ -7667,113 +7162,10 @@ PS C:\> $BackupJcOrganizationResults.User None - - - - - Filter - - Filters to narrow down search. - - System.String[] - - System.String[] - - - None - - - SystemId - - A comma separated list of System IDs to query against. - - System.String[] - - System.String[] - - - None - - - Table - - Name of the SystemInsights Table to query. See docs.jumpcloud.com for list of available Table endpoints. - - System.String - - System.String - - - None - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> Get-JCSystemInsights -Table:('App'); - - Get all Apps from systems with system insights enabled. - - - - -------------------------- Example 2 -------------------------- - PS C:\> Get-JCSystemInsights -Table:('App') -SystemId:('5d66e0ac51db1e789bb17c77', '5e0e19831bc893319ae068b6'); - - Get all Apps from the specific systems. - - - - -------------------------- Example 3 -------------------------- - PS C:\> Get-JCSystemInsights -Table:('App') -Filter:('system_id:eq:5d66e0ac51db1e789bb17c77', 'bundle_name:eq:storeuid'); - - Get systems that have a specific App on a specific system where the filter is multiple strings. - - - - -------------------------- Example 4 -------------------------- - PS C:\> Get-JCSystemInsights -Table:('App') -Filter:('system_id:eq:5d66e0ac51db1e789bb17c77, bundle_name:eq:storeuid'); - - Get systems that have a specific App on a specific system where the filter is a string. - - - - - - Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCSystemInsights - - - - - - Get-JCSystemUser - Get - JCSystemUser - - Returns all JumpCloud Users associated with a JumpCloud System. - - - - The Get-JCSystemUser function returns all the JumpCloud Users associated with the system. Users can be associated with a JumpCloud system through a direct bind, a User Group, or both. The output of the Get-JCSystemUser identifies the associations between JumpCloud Users and the system. - - - - Get-JCSystemUser - - SystemID + + displayName - The _id of the System which you want to query. - To find a JumpCloud SystemID run the command: - PS C:\> Get-JCSystem | Select hostname, _id - The SystemID will be the 24 character string populated for the _id field. - SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCSystem function before calling Get-JCSystemUser. This is shown in EXAMPLES 2 and 3. + A search filter to search systems by the displayName. System.String @@ -7782,108 +7174,15 @@ PS C:\> $BackupJcOrganizationResults.User None - - - - - SystemID - - The _id of the System which you want to query. - To find a JumpCloud SystemID run the command: - PS C:\> Get-JCSystem | Select hostname, _id - The SystemID will be the 24 character string populated for the _id field. - SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCSystem function before calling Get-JCSystemUser. This is shown in EXAMPLES 2 and 3. - - System.String - - System.String - - - None - - - - - - System.String - - - - - - - - - - System.Object - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> Get-JCSystemUser -SystemID 59f2s305383coo7t369ef7r2 - - This example returns all users associated with the JumpCloud System with a SystemID of '59f2s305383coo7t369ef7r2' - - - - -------------------------- Example 2 -------------------------- - PS C:\> Get-JCSystem | Get-JCSystemUser - - This example returns all the JumpCloud users associated with all JumpCloud systems within a JumpCloud tenant. - - - - -------------------------- Example 3 -------------------------- - PS C:\> Get-JCSystem | Where-Object os -like *Mac* | Get-JCSystemUser - - This example returns all the JumpCloud users associated with all JumpCloud systems within an operating system like 'Mac'. - - - - -------------------------- Example 4 -------------------------- - PS C:\> Get-JCSystem | Get-JCSystemUser | Where-Object Administrator -EQ True - - This example returns all the JumpCloud users whos have Administrator permissions on JumpCloud systems. - - - - - - Online Version: - https://github.com/TheJumpCloud/support/wiki/Get-JCSystemUser - - - - - - Get-JCUser - Get - JCUser - - Returns all JumpCloud Users within a JumpCloud tenant or searches for a JumpCloud User by 'username', 'firstname', 'lastname', or 'email'. - - - - The Get-JCUser function returns all information describing a JumpCloud user. By default it will return all Users. Note: String parameters are case-insensitive - - - - Get-JCUser - - username + + filterDateProperty - The Username of the JumpCloud user you wish to search for. + A parameter that can filter on the property 'created' or 'lastContact'. Only inactive systems will be returned when using the lastContact filter. This parameter if used creates two more dynamic parameters 'dateFilter' and 'date'. See EXAMPLE 5 above for full syntax. + + created + lastContact + System.String System.String @@ -7892,21 +7191,9 @@ PS C:\> $BackupJcOrganizationResults.User None - account_locked - - A search filter to return users that are in a locked ($true) or unlocked ($false) state. - - System.Boolean - - System.Boolean - - - None - - - activated + hasServiceAccount - A search filter to return users that are activated ($true) or those that have not set a password ($false). + A search filter to show macOS systems that have the JumpCloud service account System.Boolean @@ -7916,9 +7203,9 @@ PS C:\> $BackupJcOrganizationResults.User None - allow_public_key + modifySSHDConfig - A search filter to show accounts that are enabled ($true) or disabled ($true) to allow_public_key + A search filter to show systems that are enabled ($true) or disabled ($true) for modifySSHDConfig System.Boolean @@ -7928,9 +7215,9 @@ PS C:\> $BackupJcOrganizationResults.User None - company + os - The company of the JumpCloud user you wish to search for. + A search filter to search systems by the OS. System.String @@ -7940,9 +7227,9 @@ PS C:\> $BackupJcOrganizationResults.User None - costCenter + remoteIP - The costCenter of the JumpCloud user you wish to search for. + A search filter to search systems by the remoteIP. System.String @@ -7951,38 +7238,60 @@ PS C:\> $BackupJcOrganizationResults.User None - - date - - Date to filter on. - - System.DateTime - - System.DateTime - - - None - - - dateFilter + + returnProperties - Condition to filter date on. + Allows you to return select properties on JumpCloud system objects. Specifying what properties are returned can drastically increase the speed of the API call with a large data set. Valid properties that can be returned are: 'created', 'active', 'agentVersion', 'allowMultiFactorAuthentication', 'allowPublicKeyAuthentication', 'allowSshPasswordAuthentication', 'allowSshRootLogin', 'arch', 'created', 'displayName', 'hostname', 'lastContact', 'modifySSHDConfig', 'organization', 'os', 'remoteIP', 'serialNumber', 'sshdParams', 'systemTimezone', 'templateName', 'version' - before - after + acknowledged + active + agentVersion + allowMultiFactorAuthentication + allowPublicKeyAuthentication + allowSshPasswordAuthentication + allowSshRootLogin + arch + azureAdJoined + connectionHistory + created + displayName + domainInfo + fde + fileSystem + hasServiceAccount + hostname + lastContact + mdm + modifySSHDConfig + networkInterfaces + organization + os + osFamily + provisionMetadata + remoteIP + serialNumber + serviceAccountState + sshdParams + systemInsights + systemTimezone + systemToken + templateName + userMetrics + usernameHashes + version - System.String + System.String[] - System.String + System.String[] None - department + serialNumber - The department of the JumpCloud user you wish to search for. + A search filter to search systems by the serialNumber. System.String @@ -7992,9 +7301,9 @@ PS C:\> $BackupJcOrganizationResults.User None - description + systemTimezone - The description of the JumpCloud user you wish to search for. + A search filter to search systems by the serialNumber. This field DOES NOT take wildcard input. System.String @@ -8004,9 +7313,9 @@ PS C:\> $BackupJcOrganizationResults.User None - displayname + templateName - The preferred name of the JumpCloud user you wish to search for. + A search filter to search systems by the templateName. System.String @@ -8016,9 +7325,9 @@ PS C:\> $BackupJcOrganizationResults.User None - email + version - The Email of the JumpCloud user you wish to search for. + A search filter to search systems by the version. System.String @@ -8027,23 +7336,30 @@ PS C:\> $BackupJcOrganizationResults.User None - - employeeIdentifier + + + Get-JCSystem + + date - The employeeIdentifier of the JumpCloud user you wish to search for. + Date to filter on. - System.String + System.DateTime - System.String + System.DateTime None - - employeeType + + dateFilter - The employeeType of the JumpCloud user you wish to search for. + Condition to filter date on. + + before + after + System.String System.String @@ -8052,45 +7368,20 @@ PS C:\> $BackupJcOrganizationResults.User None - enable_managed_uid - - A search filter to show accounts that are enabled ($true) or disabled ($false) for enable_managed_uid - - System.Boolean - - System.Boolean - - - None - - - enable_user_portal_multifactor - - A search filter to show accounts that are enabled ($true) or disabled ($false) for enable_user_portal_multifactor - - System.Boolean - - System.Boolean - - - None - - - external_dn + SystemFDEKey - The distinguished name of the AD domain (ADB Externally managed users only) + A switch parameter to reveal the SystemFDEKey - System.String - System.String + System.Management.Automation.SwitchParameter - None + False - - external_source_type + + SystemID - The externally managed user source type (ADB Externally managed users only) + The _id or id of the System which you want to query. System.String @@ -8099,13 +7390,1232 @@ PS C:\> $BackupJcOrganizationResults.User None - - externally_managed - - A search filter to show accounts that are enabled ($true) or disabled ($false) for externally_managed - - System.Boolean - + + + + + active + + Filter for systems that are online or offline. + + System.Boolean + + System.Boolean + + + None + + + agentVersion + + A search filter to search systems by the agentVersion. + + System.String + + System.String + + + None + + + allowMultiFactorAuthentication + + A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication + + System.Boolean + + System.Boolean + + + None + + + allowPublicKeyAuthentication + + A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication + + System.Boolean + + System.Boolean + + + None + + + allowSshPasswordAuthentication + + A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication + + System.Boolean + + System.Boolean + + + None + + + allowSshRootLogin + + A search filter to show systems that are enabled ($true) or disabled ($true) for allowMultiFactorAuthentication + + System.Boolean + + System.Boolean + + + None + + + arch + + A search filter to search systems by the processor arch. + + System.String + + System.String + + + None + + + date + + Date to filter on. + + System.DateTime + + System.DateTime + + + None + + + dateFilter + + Condition to filter date on. + + System.String + + System.String + + + None + + + description + + A search filter to search systems by the description. + + System.String + + System.String + + + None + + + displayName + + A search filter to search systems by the displayName. + + System.String + + System.String + + + None + + + filterDateProperty + + A parameter that can filter on the property 'created' or 'lastContact'. Only inactive systems will be returned when using the lastContact filter. This parameter if used creates two more dynamic parameters 'dateFilter' and 'date'. See EXAMPLE 5 above for full syntax. + + System.String + + System.String + + + None + + + hasServiceAccount + + A search filter to show macOS systems that have the JumpCloud service account + + System.Boolean + + System.Boolean + + + None + + + hostname + + A search filter to search systems by the hostname. + + System.String + + System.String + + + None + + + modifySSHDConfig + + A search filter to show systems that are enabled ($true) or disabled ($true) for modifySSHDConfig + + System.Boolean + + System.Boolean + + + None + + + os + + A search filter to search systems by the OS. + + System.String + + System.String + + + None + + + remoteIP + + A search filter to search systems by the remoteIP. + + System.String + + System.String + + + None + + + returnProperties + + Allows you to return select properties on JumpCloud system objects. Specifying what properties are returned can drastically increase the speed of the API call with a large data set. Valid properties that can be returned are: 'created', 'active', 'agentVersion', 'allowMultiFactorAuthentication', 'allowPublicKeyAuthentication', 'allowSshPasswordAuthentication', 'allowSshRootLogin', 'arch', 'created', 'displayName', 'hostname', 'lastContact', 'modifySSHDConfig', 'organization', 'os', 'remoteIP', 'serialNumber', 'sshdParams', 'systemTimezone', 'templateName', 'version' + + System.String[] + + System.String[] + + + None + + + serialNumber + + A search filter to search systems by the serialNumber. + + System.String + + System.String + + + None + + + SystemFDEKey + + A switch parameter to reveal the SystemFDEKey + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + SystemID + + The _id or id of the System which you want to query. + + System.String + + System.String + + + None + + + systemTimezone + + A search filter to search systems by the serialNumber. This field DOES NOT take wildcard input. + + System.String + + System.String + + + None + + + templateName + + A search filter to search systems by the templateName. + + System.String + + System.String + + + None + + + version + + A search filter to search systems by the version. + + System.String + + System.String + + + None + + + + + + System.String + + + + + + + + System.Management.Automation.SwitchParameter + + + + + + + + System.Boolean + + + + + + + + System.String[] + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Get-JCSystem + + Returns all JumpCloud managed systems and the information describing these systems. + + + + -------------------------- Example 2 -------------------------- + Get-JCSystemUser -SystemID 5n0795a712704la4eve154r + + Returns a single JumpCloud System with SystemID '5n0795a712704la4eve154r'. + + + + -------------------------- Example 3 -------------------------- + Get-JCSystem -active $true + + Returns all active JumpCloud Systems and the information describing these systems. + + + + -------------------------- Example 4 -------------------------- + Get-JCSystem -agentVersion '0.9.6*' -os '*Mac*' + + Returns all JumpCloud systems where the agentVersion is '0.9.6. ' and the operating system is like ' Mac*' + + + + -------------------------- Example 5 -------------------------- + Get-JCSystem -filterDateProperty created -dateFilter after -date 01/01/2018 + + Returns all JumpCloud systems that were created after 01/01/2018 using the parameter -filterDateProperty and the dynamic parameters -dateFilter and -date + + + + -------------------------- Example 6 -------------------------- + Get-JCSystem -returnProperties remoteIP, active + + Returns all JumpCloud systems and the properties remoteIP and active. The default properties that return are lastContact and _id. + + + + -------------------------- Example 7 -------------------------- + Get-JCSystem -hostname thisjchost + + Returns JumpCloud system with hostname 'thisjchost' NOTE: String parameters are case-insensitive. Hostname 'thisjchost' and 'thisJcHost' will return the same information. + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/Get-JCSystem + + + + + + Get-JCSystemApp + Get + JCSystemApp + + Returns the applications/programs/linux packages installed on JumpCloud managed system(s). This function queries separate system insights tables to get data for macOS/windows/linux devices. + + + + Get-JCSystem app function helps admins identify what applications/programs or linux packages exist on their JumpCloud managed systems. + + + + Get-JCSystemApp + + name + + The name of the application you want to search for ex. (Jumpcloud, Slack). Name will always query the "name" property from system insights. Note, for macOS systems, ".app" will be applied. This field is case sensitive. + + System.String + + System.String + + + None + + + Search + + Search for a specific application by from all systems in the org ex. (Get-JCSystemApp -Search -Name "Jumpcloud") THIS PARAMETER DOES NOT TAKE INPUT + + + System.Management.Automation.SwitchParameter + + + False + + + SystemID + + The System Id of the JumpCloud system you want to search for applications + + System.String + + System.String + + + None + + + SystemOS + + The type (windows, mac, linux) of the JumpCloud Command you wish to search ex. (Windows, macOs, Linux)) + + + Windows + macOS + Linux + + System.String + + System.String + + + None + + + version + + The version of the application you want to search for ex. 1.1.2. Note: on Windows/ Linux devices, this parameter will filter on the 'version' property, for macOS applications this parameter will filter on the 'bundleShortVersion' property. + + System.String + + System.String + + + None + + + + + + name + + The name of the application you want to search for ex. (Jumpcloud, Slack). Name will always query the "name" property from system insights. Note, for macOS systems, ".app" will be applied. This field is case sensitive. + + System.String + + System.String + + + None + + + Search + + Search for a specific application by from all systems in the org ex. (Get-JCSystemApp -Search -Name "Jumpcloud") THIS PARAMETER DOES NOT TAKE INPUT + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + SystemID + + The System Id of the JumpCloud system you want to search for applications + + System.String + + System.String + + + None + + + SystemOS + + The type (windows, mac, linux) of the JumpCloud Command you wish to search ex. (Windows, macOs, Linux)) + + System.String + + System.String + + + None + + + version + + The version of the application you want to search for ex. 1.1.2. Note: on Windows/ Linux devices, this parameter will filter on the 'version' property, for macOS applications this parameter will filter on the 'bundleShortVersion' property. + + System.String + + System.String + + + None + + + + + + System.String + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Get-JCSystemApp -SystemId '6363237ec991136ae59892e4' + + Returns the applications installed in the system with the given -SystemId + + + + -------------------------- Example 2 -------------------------- + PS C:\> Get-JCSystemApp -SystemOs 'macOS' + + Returns the 'macOS' systems and all the applications installed for each system + + + + -------------------------- Example 3 -------------------------- + PS C:\> Get-JCSystemApp -SystemOs 'macOS' -Name 'Jumpcloud' + + + + + + -------------------------- Example 4 -------------------------- + PS C:\> Get-JCSystemApp -SystemOs 'macOS' -Name 'Jumpcloud' -Version 'v1.16.2' + + Returns the 'macOS' systems that have a 'Jumpcloud' tray application with the version 'v1.16.2' + + + + -------------------------- Example 5 -------------------------- + PS C:\> Get-JCSystemApp -Name 'jumpcloud' -Search + + Returns any 'jumpcloud' software installed in all the OS systems (Windows/Linux/macOS) + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/ + + + + + + Get-JCSystemGroupMember + Get + JCSystemGroupMember + + Returns the System Group members of a JumpCloud System Group. + + + + The Get-JCSystemGroupMember function returns all the System Group members of a JumpCloud System Group. + + + + Get-JCSystemGroupMember + + ByID + + If searching for a System Group using the GroupID populate the GroupID in the -ByID field. + + System.String + + System.String + + + None + + + + Get-JCSystemGroupMember + + GroupName + + The name of the JumpCloud System Group you want to return the members of. + + System.String + + System.String + + + None + + + + + + ByID + + If searching for a System Group using the GroupID populate the GroupID in the -ByID field. + + System.String + + System.String + + + None + + + GroupName + + The name of the JumpCloud System Group you want to return the members of. + + System.String + + System.String + + + None + + + + + + System.String + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Get-JCSystemGroupMember -GroupName 'OSX Group' + + Returns the JumpCloud Systems that are a member of the group 'OSX Group' + + + + -------------------------- Example 2 -------------------------- + PS C:\> Get-JCGroup -Type System | Get-JCSystemGroupMember + + Returns all JumpCloud System Groups and their System members. + + + + -------------------------- Example 3 -------------------------- + PS C:\> Get-JCGroup -Type System | Get-JCSystemGroupMember | Where-Object System -EQ 'Server01' + + Returns all JumpCloud System Groups that the system with a hostname of 'Server01' is a member of. + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/Get-JCSystemGroupMember + + + + + + Get-JCSystemInsights + Get + JCSystemInsights + + JumpCloud's System Insights feature provides admins with the ability to easily interrogate their fleet of systems to find important pieces of information. Using this function you can easily gather heightened levels of information from your fleet of JumpCloud managed systems. + + + + Using Get-JCSystemInsights will allow you to easily query JumpCloud's RESTful API to return information from your fleet of JumpCloud managed systems. + + + + Get-JCSystemInsights + + Filter + + Filters to narrow down search. + + System.String[] + + System.String[] + + + None + + + SystemId + + A comma separated list of System IDs to query against. + + System.String[] + + System.String[] + + + None + + + Table + + Name of the SystemInsights Table to query. See docs.jumpcloud.com for list of available Table endpoints. + + System.String + + System.String + + + None + + + + + + Filter + + Filters to narrow down search. + + System.String[] + + System.String[] + + + None + + + SystemId + + A comma separated list of System IDs to query against. + + System.String[] + + System.String[] + + + None + + + Table + + Name of the SystemInsights Table to query. See docs.jumpcloud.com for list of available Table endpoints. + + System.String + + System.String + + + None + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Get-JCSystemInsights -Table:('App'); + + Get all Apps from systems with system insights enabled. + + + + -------------------------- Example 2 -------------------------- + PS C:\> Get-JCSystemInsights -Table:('App') -SystemId:('5d66e0ac51db1e789bb17c77', '5e0e19831bc893319ae068b6'); + + Get all Apps from the specific systems. + + + + -------------------------- Example 3 -------------------------- + PS C:\> Get-JCSystemInsights -Table:('App') -Filter:('system_id:eq:5d66e0ac51db1e789bb17c77', 'bundle_name:eq:storeuid'); + + Get systems that have a specific App on a specific system where the filter is multiple strings. + + + + -------------------------- Example 4 -------------------------- + PS C:\> Get-JCSystemInsights -Table:('App') -Filter:('system_id:eq:5d66e0ac51db1e789bb17c77, bundle_name:eq:storeuid'); + + Get systems that have a specific App on a specific system where the filter is a string. + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/Get-JCSystemInsights + + + + + + Get-JCSystemUser + Get + JCSystemUser + + Returns all JumpCloud Users associated with a JumpCloud System. + + + + The Get-JCSystemUser function returns all the JumpCloud Users associated with the system. Users can be associated with a JumpCloud system through a direct bind, a User Group, or both. The output of the Get-JCSystemUser identifies the associations between JumpCloud Users and the system. + + + + Get-JCSystemUser + + SystemID + + The _id of the System which you want to query. + To find a JumpCloud SystemID run the command: + PS C:\> Get-JCSystem | Select hostname, _id + The SystemID will be the 24 character string populated for the _id field. + SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCSystem function before calling Get-JCSystemUser. This is shown in EXAMPLES 2 and 3. + + System.String + + System.String + + + None + + + + + + SystemID + + The _id of the System which you want to query. + To find a JumpCloud SystemID run the command: + PS C:\> Get-JCSystem | Select hostname, _id + The SystemID will be the 24 character string populated for the _id field. + SystemID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCSystem function before calling Get-JCSystemUser. This is shown in EXAMPLES 2 and 3. + + System.String + + System.String + + + None + + + + + + System.String + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Get-JCSystemUser -SystemID 59f2s305383coo7t369ef7r2 + + This example returns all users associated with the JumpCloud System with a SystemID of '59f2s305383coo7t369ef7r2' + + + + -------------------------- Example 2 -------------------------- + PS C:\> Get-JCSystem | Get-JCSystemUser + + This example returns all the JumpCloud users associated with all JumpCloud systems within a JumpCloud tenant. + + + + -------------------------- Example 3 -------------------------- + PS C:\> Get-JCSystem | Where-Object os -like *Mac* | Get-JCSystemUser + + This example returns all the JumpCloud users associated with all JumpCloud systems within an operating system like 'Mac'. + + + + -------------------------- Example 4 -------------------------- + PS C:\> Get-JCSystem | Get-JCSystemUser | Where-Object Administrator -EQ True + + This example returns all the JumpCloud users whos have Administrator permissions on JumpCloud systems. + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/Get-JCSystemUser + + + + + + Get-JCUser + Get + JCUser + + Returns all JumpCloud Users within a JumpCloud tenant or searches for a JumpCloud User by 'username', 'firstname', 'lastname', or 'email'. + + + + The Get-JCUser function returns all information describing a JumpCloud user. By default it will return all Users. Note: String parameters are case-insensitive + + + + Get-JCUser + + username + + The Username of the JumpCloud user you wish to search for. + + System.String + + System.String + + + None + + + account_locked + + A search filter to return users that are in a locked ($true) or unlocked ($false) state. + + System.Boolean + + System.Boolean + + + None + + + activated + + A search filter to return users that are activated ($true) or those that have not set a password ($false). + + System.Boolean + + System.Boolean + + + None + + + allow_public_key + + A search filter to show accounts that are enabled ($true) or disabled ($true) to allow_public_key + + System.Boolean + + System.Boolean + + + None + + + company + + The company of the JumpCloud user you wish to search for. + + System.String + + System.String + + + None + + + costCenter + + The costCenter of the JumpCloud user you wish to search for. + + System.String + + System.String + + + None + + + date + + Date to filter on. + + System.DateTime + + System.DateTime + + + None + + + dateFilter + + Condition to filter date on. + + + before + after + + System.String + + System.String + + + None + + + department + + The department of the JumpCloud user you wish to search for. + + System.String + + System.String + + + None + + + description + + The description of the JumpCloud user you wish to search for. + + System.String + + System.String + + + None + + + displayname + + The preferred name of the JumpCloud user you wish to search for. + + System.String + + System.String + + + None + + + email + + The Email of the JumpCloud user you wish to search for. + + System.String + + System.String + + + None + + + employeeIdentifier + + The employeeIdentifier of the JumpCloud user you wish to search for. + + System.String + + System.String + + + None + + + employeeType + + The employeeType of the JumpCloud user you wish to search for. + + System.String + + System.String + + + None + + + enable_managed_uid + + A search filter to show accounts that are enabled ($true) or disabled ($false) for enable_managed_uid + + System.Boolean + + System.Boolean + + + None + + + enable_user_portal_multifactor + + A search filter to show accounts that are enabled ($true) or disabled ($false) for enable_user_portal_multifactor + + System.Boolean + + System.Boolean + + + None + + + external_dn + + The distinguished name of the AD domain (ADB Externally managed users only) + + System.String + + System.String + + + None + + + external_source_type + + The externally managed user source type (ADB Externally managed users only) + + System.String + + System.String + + + None + + + externally_managed + + A search filter to show accounts that are enabled ($true) or disabled ($false) for externally_managed + + System.Boolean + System.Boolean @@ -12086,70 +12596,525 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - work_country + + work_country + + Specifies the user's country on the work address object. This property is nested within the LDAP property with the displayName postalAddress. + + System.String + + System.String + + + None + + + work_fax_number + + Specifies the user's work fax number. The LDAP displayName of this property is facsimileTelephoneNumber. + + System.String + + System.String + + + None + + + work_locality + + Specifies the user's city on their work address object. The LDAP displayName of this property is l. + + System.String + + System.String + + + None + + + work_mobile_number + + Specifies the user's work mobile number. The LDAP displayName of this property is pager. + + System.String + + System.String + + + None + + + work_number + + Specifies the user's work number. The LDAP displayName of this property is telephoneNumber. + + System.String + + System.String + + + None + + + work_poBox + + Specifies the user's poBox on their work address object. The LDAP displayName of this property is postOfficeBox. + + System.String + + System.String + + + None + + + work_postalCode + + Specifies the user's postalCode on their work address object. The LDAP displayName of this property is postalCode. + + System.String + + System.String + + + None + + + work_region + + Specifies the user's state on their work address object. This property is nested within the LDAP property with the displayName postalAddress. + + System.String + + System.String + + + None + + + work_streetAddress + + Specifies the user's streetAddress on their work address object. This property is nested within the LDAP property with the displayName postalAddress. + + System.String + + System.String + + + None + + + + + + System.String + + + + + + + + System.Boolean + + + + + + + + System.Int32 + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> New-JCUser -firstname Clarence -lastname Clemons -username cclemons -email cclemons@theband.com + + This example creates the user with username cclemons. Because a password is not specified the user will be created in an inactive state and an activation email will be sent to 'cclemons@theband.com'. + + + + -------------------------- Example 2 -------------------------- + PS C:\> New-JCUser -firstname Clarence -lastname Clemons -username cclemons -email cclemons@theband.com -password Password1! + + This example creates the user with username cclemons. Because a password is specified the user will be created in an active state and no activation email will be sent. + + + + -------------------------- Example 3 -------------------------- + PS C:\> New-JCUser -firstname Clarence -lastname Clemons -username cclemons -email cclemons@theband.com -password Password1! -NumberOfCustomAttributes 2 -Attribute1_name 'Band' -Attribute1_value 'E Street' -Attribute2_name 'Instrument' -Attribute2_value 'Sax' + + This example creates the user with username cclemons and two Custom Attributes. Because a password is specified the user will be created in an active state and no activation email will be sent. When adding Custom Attributes the number of Custom Attributes being added must be declared by the -NumberOfCustomAttributes Parameter. + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/New-JCUser + + + + + + New-JCUserGroup + New + JCUserGroup + + Creates a JumpCloud User Group + + + + Creates a JumpCloud User Group. Note that a JumpCloud User Group must have a unique name. + + + + New-JCUserGroup + + GroupName + + The name of the new JumpCloud User Group. + + System.String + + System.String + + + None + + + + + + GroupName + + The name of the new JumpCloud User Group. + + System.String + + System.String + + + None + + + + + + System.String + - Specifies the user's country on the work address object. This property is nested within the LDAP property with the displayName postalAddress. + - System.String + + + + - System.String - + System.Object - None - + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> New-JCUserGroup -GroupName 'New User Group' + + Creates a new JumpCloud User Group with the name 'New User Group' + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/New-JCUserGroup + + + + + + Remove-JCAssociation + Remove + JCAssociation + + Remove an association between two object within the JumpCloud console. + + + + The Remove-JCAssociation function allows you to create associations of a specific object to a target object. + + + + Remove-JCAssociation + + Type + + The type of the object. + + + command + ldap_server + policy + application + radius_server + system_group + system + user_group + user + g_suite + office_365 + + System.String + + System.String + + + None + + + Id + + The unique id of the object. + + System.String[] + + System.String[] + + + None + + + TargetId + + The unique id of the target object. + + System.String + + System.String + + + None + + + TargetName + + The name of the target object. + + System.String + + System.String + + + None + + + TargetType + + The type of the target object. + + + user + user_group + system + system_group + policy + command + application + g_suite + ldap_server + office_365 + radius_server + + System.String[] + + System.String[] + + + None + + + Force + + Bypass user prompts and dynamic ValidateSet. + + + System.Management.Automation.SwitchParameter + + + False + + + + Remove-JCAssociation + + Type + + The type of the object. + + + command + ldap_server + policy + application + radius_server + system_group + system + user_group + user + g_suite + office_365 + + System.String + + System.String + + + None + + + Name + + The name of the object. + + System.String[] + + System.String[] + + + None + + + TargetId + + The unique id of the target object. + + System.String + + System.String + + + None + + + TargetName + + The name of the target object. + + System.String + + System.String + + + None + + + TargetType + + The type of the target object. + + + user + user_group + system + system_group + policy + command + application + g_suite + ldap_server + office_365 + radius_server + + System.String[] + + System.String[] + + + None + + + Force + + Bypass user prompts and dynamic ValidateSet. + + + System.Management.Automation.SwitchParameter + + + False + + + + - work_fax_number - - Specifies the user's work fax number. The LDAP displayName of this property is facsimileTelephoneNumber. - - System.String - - System.String - - - None - - - work_locality + Force - Specifies the user's city on their work address object. The LDAP displayName of this property is l. + Bypass user prompts and dynamic ValidateSet. - System.String + System.Management.Automation.SwitchParameter - System.String + System.Management.Automation.SwitchParameter - None + False - - work_mobile_number + + Id - Specifies the user's work mobile number. The LDAP displayName of this property is pager. + The unique id of the object. - System.String + System.String[] - System.String + System.String[] None - - work_number + + Name - Specifies the user's work number. The LDAP displayName of this property is telephoneNumber. + The name of the object. - System.String + System.String[] - System.String + System.String[] None - - work_poBox + + TargetId - Specifies the user's poBox on their work address object. The LDAP displayName of this property is postOfficeBox. + The unique id of the target object. System.String @@ -12158,10 +13123,10 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - work_postalCode + + TargetName - Specifies the user's postalCode on their work address object. The LDAP displayName of this property is postalCode. + The name of the target object. System.String @@ -12170,22 +13135,22 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - work_region + + TargetType - Specifies the user's state on their work address object. This property is nested within the LDAP property with the displayName postalAddress. + The type of the target object. - System.String + System.String[] - System.String + System.String[] None - - work_streetAddress + + Type - Specifies the user's streetAddress on their work address object. This property is nested within the LDAP property with the displayName postalAddress. + The type of the object. System.String @@ -12206,7 +13171,7 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV - System.Boolean + System.Management.Automation.SwitchParameter @@ -12214,7 +13179,7 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV - System.Int32 + System.String[] @@ -12239,52 +13204,162 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV -------------------------- Example 1 -------------------------- - PS C:\> New-JCUser -firstname Clarence -lastname Clemons -username cclemons -email cclemons@theband.com + PS C:\> Remove-JCAssociation -Type:('radiusservers') -Id:('5c5c371704c4b477964ab4fa') -TargetType:('user_group') -TargetId:('59f20255c9118021fa01b80f') - This example creates the user with username cclemons. Because a password is not specified the user will be created in an inactive state and an activation email will be sent to 'cclemons@theband.com'. + Remove the association between the radius server "5c5c371704c4b477964ab4fa" and the user group "59f20255c9118021fa01b80f". -------------------------- Example 2 -------------------------- - PS C:\> New-JCUser -firstname Clarence -lastname Clemons -username cclemons -email cclemons@theband.com -password Password1! + PS C:\> New-JCAssociation -Type:('radiusservers') -Name:('RadiusServer1') -TargetType:('user_group') -TargetName:('All Users') - This example creates the user with username cclemons. Because a password is specified the user will be created in an active state and no activation email will be sent. + Remove the association between the radius server "RadiusServer1" and the user group "All Users". + + + + + + Online Version: + https://github.com/TheJumpCloud/support/wiki/Remove-JCAssociation + + + + + + Remove-JCCommand + Remove + JCCommand + + Removes a JumpCloud command + + + + The Remove-JCCommand can remove a single JumpCloud command or multiple commands that are passed to the command over the pipeline. The default behavior is to prompt with a warning message when deleting a command result but this can be suppressed with the -force Parameter. + + + + Remove-JCCommand + + CommandID + + The _id of the JumpCloud Command you wish to query. To find a JumpCloud CommandID run the command: PS C:\> Get-JCCommand | Select name, _id + The CommandID will be the 24 character string populated for the _id field. CommandID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandID. + + System.String + + System.String + + + None + + + force + + A SwitchParameter which removes the warning message when removing a JumpCloud Command. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + CommandID + + The _id of the JumpCloud Command you wish to query. To find a JumpCloud CommandID run the command: PS C:\> Get-JCCommand | Select name, _id + The CommandID will be the 24 character string populated for the _id field. CommandID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandID. + + System.String + + System.String + + + None + + + force + + A SwitchParameter which removes the warning message when removing a JumpCloud Command. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + System.String + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> Remove-JCCommand -CommandID 5j09o6f23dan6f4n035601d5 + + Removes the JumpCloud Command with a CommandID of '5j09o6f23dan6f4n035601d5'. A warning message will be presented to confirm this operation. - -------------------------- Example 3 -------------------------- - PS C:\> New-JCUser -firstname Clarence -lastname Clemons -username cclemons -email cclemons@theband.com -password Password1! -NumberOfCustomAttributes 2 -Attribute1_name 'Band' -Attribute1_value 'E Street' -Attribute2_name 'Instrument' -Attribute2_value 'Sax' + -------------------------- Example 2 -------------------------- + PS C:\> Remove-JCCommand -CommandID 5j09o6f23dan6f4n035601d5 -Force - This example creates the user with username cclemons and two Custom Attributes. Because a password is specified the user will be created in an active state and no activation email will be sent. When adding Custom Attributes the number of Custom Attributes being added must be declared by the -NumberOfCustomAttributes Parameter. + Removes the JumpCloud Command with a CommandID of '5j09o6f23dan6f4n035601d5'. A warning message will not be presented to confirm this operation because the '-Force' parameter is used. Online Version: - https://github.com/TheJumpCloud/support/wiki/New-JCUser + https://github.com/TheJumpCloud/support/wiki/Remove-JCCommand - New-JCUserGroup - New - JCUserGroup + Remove-JCCommandResult + Remove + JCCommandResult - Creates a JumpCloud User Group + Removes a JumpCloud Command Result - Creates a JumpCloud User Group. Note that a JumpCloud User Group must have a unique name. + The Remove-JCCommandResult can remove a single JumpCloud command result or multiple command results that are passed to the command over the pipeline. The default behavior is to prompt with a warning message when deleting a command result but this can be suppressed with the -force Parameter. - New-JCUserGroup - - GroupName + Remove-JCCommandResult + + CommandResultID - The name of the new JumpCloud User Group. + The _id of the JumpCloud Command Result you wish to query. To find a JumpCloud Command Result run the command: PS C:\> Get-JCCommandResult | Select name, _id + The CommandResultID will be the 24 character string populated for the _id field. CommandResultID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandResultID. This is shown in EXAMPLES 3 and 4. System.String @@ -12293,13 +13368,25 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None + + force + + A SwitchParameter which removes the warning message when removing a JumpCloud Command Result. + + + System.Management.Automation.SwitchParameter + + + False + - - GroupName + + CommandResultID - The name of the new JumpCloud User Group. + The _id of the JumpCloud Command Result you wish to query. To find a JumpCloud Command Result run the command: PS C:\> Get-JCCommandResult | Select name, _id + The CommandResultID will be the 24 character string populated for the _id field. CommandResultID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandResultID. This is shown in EXAMPLES 3 and 4. System.String @@ -12308,6 +13395,18 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None + + force + + A SwitchParameter which removes the warning message when removing a JumpCloud Command Result. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + @@ -12336,88 +13435,60 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV - -------------------------- Example 1 -------------------------- - PS C:\> New-JCUserGroup -GroupName 'New User Group' + -------------------------- Example 1 -------------------------- + PS C:\> Remove-JCCommandResult -CommandResultID 5j09o6f23dan6f4n035601d5 + + Removes the JumpCloud Command Result with a CommandResultID of '5j09o6f23dan6f4n035601d5'. A warning message will be presented to confirm this operation. + + + + -------------------------- Example 2 -------------------------- + PS C:\> Remove-JCCommandResult -CommandResultID 5j09o6f23dan6f4n035601d5 -Force - Creates a new JumpCloud User Group with the name 'New User Group' + Removes the JumpCloud Command Result with a CommandResultID of '5j09o6f23dan6f4n035601d5' using the -Force Parameter. A warning message will not be presented to confirm this operation. + + + + -------------------------- Example 3 -------------------------- + PS C:\> Get-JCCommandResult | Where-Object system -EQ 'Server01' | Remove-JCCommandResult + + Removes all JumpCloud Command Results that were run on target system with a hostname of 'Server01' A warning message will be present to confirm each operation. This warning could be suppressed using the -Force Parameter. + + + + -------------------------- Example 4 -------------------------- + PS C:\> Get-JCCommandResult | Where-Object {$_.requestTime -GT (Get-Date).AddHours(-1) -and $_.exitCode -eq 0} | Remove-JCCommandResult -force + + Removes all JumpCloud commands that were run within the last hour and that had an exitCode of '0' using the -Force Parameter. Note an exitCode of zero generally represents a successful run of a command. This command removes all success Commands Results run in the past hour. Online Version: - https://github.com/TheJumpCloud/support/wiki/New-JCUserGroup + https://github.com/TheJumpCloud/support/wiki/Remove-JCCommandResult - Remove-JCAssociation + Remove-JCCommandTarget Remove - JCAssociation + JCCommandTarget - Remove an association between two object within the JumpCloud console. + Removes the association between a JumpCloud system or a JumpCloud system group from a JumpCloud command - The Remove-JCAssociation function allows you to create associations of a specific object to a target object. + The Remove-JCCommandTarget function allows you to remove JumpCloud systems or JumpCloud system groups from the target list of a specific JumpCloud command. Group associations can be removed by system group name or system group ID system associations can only be removed using the SystemID. When JumpCloud commands are run they target all the systems on their target list. - Remove-JCAssociation - - Type - - The type of the object. - - - command - ldap_server - policy - application - radius_server - system_group - system - user_group - user - g_suite - office_365 - - System.String - - System.String - - - None - - - Id - - The unique id of the object. - - System.String[] - - System.String[] - - - None - - - TargetId - - The unique id of the target object. - - System.String - - System.String - - - None - - - TargetName + Remove-JCCommandTarget + + CommandID - The name of the target object. + The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. System.String @@ -12426,63 +13497,26 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - TargetType + + GroupID - The type of the target object. + The id value of a JumpCloud system group - - user - user_group - system - system_group - policy - command - application - g_suite - ldap_server - office_365 - radius_server - - System.String[] + System.Object - System.String[] + System.Object None - - Force - - Bypass user prompts and dynamic ValidateSet. - - - System.Management.Automation.SwitchParameter - - - False - - Remove-JCAssociation - - Type + Remove-JCCommandTarget + + CommandID - The type of the object. + The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. - - command - ldap_server - policy - application - radius_server - system_group - system - user_group - user - g_suite - office_365 - System.String System.String @@ -12490,34 +13524,25 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - Name - - The name of the object. - - System.String[] - - System.String[] - - - None - - - TargetId + + GroupName - The unique id of the target object. + The name of the JumpCloud system group. If the name includes a space enter the name within quotes. Example: -GroupName 'The Space' - System.String + System.Object - System.String + System.Object None - - TargetName + + + Remove-JCCommandTarget + + CommandID - The name of the target object. + The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. System.String @@ -12526,85 +13551,25 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - TargetType + + SystemID - The type of the target object. + The _id of a JumpCloud system. To find the _id of all JumpCloud systems within your tenant run 'Get-JCSystem | select _id, hostname' - - user - user_group - system - system_group - policy - command - application - g_suite - ldap_server - office_365 - radius_server - - System.String[] + System.Object - System.String[] + System.Object None - - Force - - Bypass user prompts and dynamic ValidateSet. - - - System.Management.Automation.SwitchParameter - - - False - - - Force - - Bypass user prompts and dynamic ValidateSet. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - Id - - The unique id of the object. - - System.String[] - - System.String[] - - - None - - - Name - - The name of the object. - - System.String[] - - System.String[] - - - None - - - TargetId + + CommandID - The unique id of the target object. + The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. System.String @@ -12612,39 +13577,39 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - - TargetName + + + GroupID - The name of the target object. + The id value of a JumpCloud system group - System.String + System.Object - System.String + System.Object None - - TargetType + + GroupName - The type of the target object. + The name of the JumpCloud system group. If the name includes a space enter the name within quotes. Example: -GroupName 'The Space' - System.String[] + System.Object - System.String[] + System.Object None - - Type + + SystemID - The type of the object. + The _id of a JumpCloud system. To find the _id of all JumpCloud systems within your tenant run 'Get-JCSystem | select _id, hostname' - System.String + System.Object - System.String + System.Object None @@ -12661,15 +13626,7 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV - System.Management.Automation.SwitchParameter - - - - - - - - System.String[] + System.Object @@ -12694,46 +13651,52 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV -------------------------- Example 1 -------------------------- - PS C:\> Remove-JCAssociation -Type:('radiusservers') -Id:('5c5c371704c4b477964ab4fa') -TargetType:('user_group') -TargetId:('59f20255c9118021fa01b80f') + Remove-JCCommandTarget -CommandID 5b99777710a3690ssisr3a1w -SystemID 5l0o2fu426041i79st3c35 - Remove the association between the radius server "5c5c371704c4b477964ab4fa" and the user group "59f20255c9118021fa01b80f". + Removes the JumpCloud system with System ID '5l0o2fu426041i79st3c35' from the target list for the JumpCloud command with command ID '5b99777710a3690ssisr3a1w' -------------------------- Example 2 -------------------------- - PS C:\> New-JCAssociation -Type:('radiusservers') -Name:('RadiusServer1') -TargetType:('user_group') -TargetName:('All Users') + Remove-JCCommandTarget -CommandID 5b99777710a3690ssisr3a1w -GroupName WindowsMachines - Remove the association between the radius server "RadiusServer1" and the user group "All Users". + Removes the JumpCloud system group 'WindowsMachines' and the systems within this group from the target list for the JumpCloud command with command ID '5b99777710a3690ssisr3a1w' + + + + -------------------------- Example 3 -------------------------- + Remove-JCCommandTarget -CommandID 5b99777710a3690ssisr3a1w -GroupID 5j03458a232z115210z66913 + + Removes the JumpCloud system group with the GroupID '5j03458a232z115210z66913' and the systems within this group from the target list for the JumpCloud command with command ID '5b99777710a3690ssisr3a1w' Online Version: - https://github.com/TheJumpCloud/support/wiki/Remove-JCAssociation + https://github.com/TheJumpCloud/support/wiki/Remove-JCCommandTarget - Remove-JCCommand + Remove-JCGsuiteMember Remove - JCCommand + JCGsuiteMember - Removes a JumpCloud command + {{ Fill in the Synopsis }} - The Remove-JCCommand can remove a single JumpCloud command or multiple commands that are passed to the command over the pipeline. The default behavior is to prompt with a warning message when deleting a command result but this can be suppressed with the -force Parameter. + {{ Fill in the Description }} - Remove-JCCommand - - CommandID + Remove-JCGsuiteMember + + GroupID - The _id of the JumpCloud Command you wish to query. To find a JumpCloud CommandID run the command: PS C:\> Get-JCCommand | Select name, _id - The CommandID will be the 24 character string populated for the _id field. CommandID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandID. + A UserGroup ID to remove to the directory System.String @@ -12742,114 +13705,61 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - force + + GroupName - A SwitchParameter which removes the warning message when removing a JumpCloud Command. + A UserGroup name to remove to the directory + System.String - System.Management.Automation.SwitchParameter + System.String - False + None + + + ID + + The ID of cloud directory instance + + System.String + + System.String + + + None + + + UserID + + A UserID to remove to the directory + + System.String + + System.String + + + None + + + Username + + A username to remove to the directory + + System.String + + System.String + + + None - - - - CommandID - - The _id of the JumpCloud Command you wish to query. To find a JumpCloud CommandID run the command: PS C:\> Get-JCCommand | Select name, _id - The CommandID will be the 24 character string populated for the _id field. CommandID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandID. - - System.String - - System.String - - - None - - - force - - A SwitchParameter which removes the warning message when removing a JumpCloud Command. - - System.Management.Automation.SwitchParameter - - System.Management.Automation.SwitchParameter - - - False - - - - - - System.String - - - - - - - - - - System.Object - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> Remove-JCCommand -CommandID 5j09o6f23dan6f4n035601d5 - - Removes the JumpCloud Command with a CommandID of '5j09o6f23dan6f4n035601d5'. A warning message will be presented to confirm this operation. - - - - -------------------------- Example 2 -------------------------- - PS C:\> Remove-JCCommand -CommandID 5j09o6f23dan6f4n035601d5 -Force - - Removes the JumpCloud Command with a CommandID of '5j09o6f23dan6f4n035601d5'. A warning message will not be presented to confirm this operation because the '-Force' parameter is used. - - - - - - Online Version: - https://github.com/TheJumpCloud/support/wiki/Remove-JCCommand - - - - - - Remove-JCCommandResult - Remove - JCCommandResult - - Removes a JumpCloud Command Result - - - - The Remove-JCCommandResult can remove a single JumpCloud command result or multiple command results that are passed to the command over the pipeline. The default behavior is to prompt with a warning message when deleting a command result but this can be suppressed with the -force Parameter. - - - Remove-JCCommandResult - - CommandResultID + Remove-JCGsuiteMember + + GroupID - The _id of the JumpCloud Command Result you wish to query. To find a JumpCloud Command Result run the command: PS C:\> Get-JCCommandResult | Select name, _id - The CommandResultID will be the 24 character string populated for the _id field. CommandResultID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandResultID. This is shown in EXAMPLES 3 and 4. + A UserGroup ID to remove to the directory System.String @@ -12858,25 +13768,73 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - force + + GroupName - A SwitchParameter which removes the warning message when removing a JumpCloud Command Result. + A UserGroup name to remove to the directory + System.String - System.Management.Automation.SwitchParameter + System.String - False + None + + + Name + + The name of cloud directory instance + + System.String + + System.String + + + None + + + UserID + + A UserID to remove to the directory + + System.String + + System.String + + + None + + + Username + + A username to remove to the directory + + System.String + + System.String + + + None - - CommandResultID + + GroupID + + A UserGroup ID to remove to the directory + + System.String + + System.String + + + None + + + GroupName - The _id of the JumpCloud Command Result you wish to query. To find a JumpCloud Command Result run the command: PS C:\> Get-JCCommandResult | Select name, _id - The CommandResultID will be the 24 character string populated for the _id field. CommandResultID has an Alias of _id. This means you can leverage the PowerShell pipeline to populate this field automatically using a function that returns the JumpCloud CommandResultID. This is shown in EXAMPLES 3 and 4. + A UserGroup name to remove to the directory System.String @@ -12885,17 +13843,53 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - force + + ID - A SwitchParameter which removes the warning message when removing a JumpCloud Command Result. + The ID of cloud directory instance - System.Management.Automation.SwitchParameter + System.String - System.Management.Automation.SwitchParameter + System.String - False + None + + + Name + + The name of cloud directory instance + + System.String + + System.String + + + None + + + UserID + + A UserID to remove to the directory + + System.String + + System.String + + + None + + + Username + + A username to remove to the directory + + System.String + + System.String + + + None @@ -12926,59 +13920,38 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV -------------------------- Example 1 -------------------------- - PS C:\> Remove-JCCommandResult -CommandResultID 5j09o6f23dan6f4n035601d5 - - Removes the JumpCloud Command Result with a CommandResultID of '5j09o6f23dan6f4n035601d5'. A warning message will be presented to confirm this operation. - - - - -------------------------- Example 2 -------------------------- - PS C:\> Remove-JCCommandResult -CommandResultID 5j09o6f23dan6f4n035601d5 -Force - - Removes the JumpCloud Command Result with a CommandResultID of '5j09o6f23dan6f4n035601d5' using the -Force Parameter. A warning message will not be presented to confirm this operation. - - - - -------------------------- Example 3 -------------------------- - PS C:\> Get-JCCommandResult | Where-Object system -EQ 'Server01' | Remove-JCCommandResult - - Removes all JumpCloud Command Results that were run on target system with a hostname of 'Server01' A warning message will be present to confirm each operation. This warning could be suppressed using the -Force Parameter. - - - - -------------------------- Example 4 -------------------------- - PS C:\> Get-JCCommandResult | Where-Object {$_.requestTime -GT (Get-Date).AddHours(-1) -and $_.exitCode -eq 0} | Remove-JCCommandResult -force + PS C:\> {{ Add example code here }} - Removes all JumpCloud commands that were run within the last hour and that had an exitCode of '0' using the -Force Parameter. Note an exitCode of zero generally represents a successful run of a command. This command removes all success Commands Results run in the past hour. + {{ Add example description here }} Online Version: - https://github.com/TheJumpCloud/support/wiki/Remove-JCCommandResult + https://github.com/TheJumpCloud/support/wiki/ - Remove-JCCommandTarget + Remove-JCOffice365Member Remove - JCCommandTarget + JCOffice365Member - Removes the association between a JumpCloud system or a JumpCloud system group from a JumpCloud command + {{ Fill in the Synopsis }} - The Remove-JCCommandTarget function allows you to remove JumpCloud systems or JumpCloud system groups from the target list of a specific JumpCloud command. Group associations can be removed by system group name or system group ID system associations can only be removed using the SystemID. When JumpCloud commands are run they target all the systems on their target list. + {{ Fill in the Description }} - Remove-JCCommandTarget - - CommandID + Remove-JCOffice365Member + + GroupID - The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. + A UserGroup ID to remove to the directory System.String @@ -12987,25 +13960,61 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - GroupID + + GroupName - The id value of a JumpCloud system group + A UserGroup name to remove to the directory - System.Object + System.String - System.Object + System.String + + + None + + + ID + + The ID of cloud directory instance + + System.String + + System.String + + + None + + + UserID + + A UserID to remove to the directory + + System.String + + System.String + + + None + + + Username + + A username to remove to the directory + + System.String + + System.String None - Remove-JCCommandTarget - - CommandID + Remove-JCOffice365Member + + GroupID - The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. + A UserGroup ID to remove to the directory System.String @@ -13014,25 +14023,22 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - + GroupName - The name of the JumpCloud system group. If the name includes a space enter the name within quotes. Example: -GroupName 'The Space' + A UserGroup name to remove to the directory - System.Object + System.String - System.Object + System.String None - - - Remove-JCCommandTarget - - CommandID + + Name - The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. + The name of cloud directory instance System.String @@ -13041,14 +14047,26 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - SystemID + + UserID - The _id of a JumpCloud system. To find the _id of all JumpCloud systems within your tenant run 'Get-JCSystem | select _id, hostname' + A UserID to remove to the directory - System.Object + System.String - System.Object + System.String + + + None + + + Username + + A username to remove to the directory + + System.String + + System.String None @@ -13056,10 +14074,10 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV - - CommandID + + GroupID - The id value of the JumpCloud command. Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant. + A UserGroup ID to remove to the directory System.String @@ -13068,55 +14086,71 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV None - - GroupID + + GroupName - The id value of a JumpCloud system group + A UserGroup name to remove to the directory - System.Object + System.String - System.Object + System.String None - - GroupName + + ID - The name of the JumpCloud system group. If the name includes a space enter the name within quotes. Example: -GroupName 'The Space' + The ID of cloud directory instance - System.Object + System.String - System.Object + System.String None - - SystemID + + Name - The _id of a JumpCloud system. To find the _id of all JumpCloud systems within your tenant run 'Get-JCSystem | select _id, hostname' + The name of cloud directory instance - System.Object + System.String - System.Object + System.String None - - - + + UserID + + A UserID to remove to the directory + + System.String System.String + + None + + + Username - + A username to remove to the directory - + System.String + + System.String + + + None + + + - System.Object + System.String @@ -13141,30 +14175,16 @@ PS C:\> New-JCPolicy -TemplateName darwin_Login_Window_Text -Values $policyV -------------------------- Example 1 -------------------------- - Remove-JCCommandTarget -CommandID 5b99777710a3690ssisr3a1w -SystemID 5l0o2fu426041i79st3c35 - - Removes the JumpCloud system with System ID '5l0o2fu426041i79st3c35' from the target list for the JumpCloud command with command ID '5b99777710a3690ssisr3a1w' - - - - -------------------------- Example 2 -------------------------- - Remove-JCCommandTarget -CommandID 5b99777710a3690ssisr3a1w -GroupName WindowsMachines - - Removes the JumpCloud system group 'WindowsMachines' and the systems within this group from the target list for the JumpCloud command with command ID '5b99777710a3690ssisr3a1w' - - - - -------------------------- Example 3 -------------------------- - Remove-JCCommandTarget -CommandID 5b99777710a3690ssisr3a1w -GroupID 5j03458a232z115210z66913 + PS C:\> {{ Add example code here }} - Removes the JumpCloud system group with the GroupID '5j03458a232z115210z66913' and the systems within this group from the target list for the JumpCloud command with command ID '5b99777710a3690ssisr3a1w' + {{ Add example description here }} Online Version: - https://github.com/TheJumpCloud/support/wiki/Remove-JCCommandTarget + https://github.com/TheJumpCloud/support/wiki/ diff --git a/PowerShell/ModuleChangelog.md b/PowerShell/ModuleChangelog.md index cf454a773..010c9bf6d 100644 --- a/PowerShell/ModuleChangelog.md +++ b/PowerShell/ModuleChangelog.md @@ -1,6 +1,24 @@ +## 2.10.0 + +Release Date: January 17, 2024 + +#### RELEASE NOTES + +``` +New Directory Functions, Add-JCGsuiteMember, Add-JCOffice365Member, Remove-JCGsuiteMember, and Remove-JCOffice365Member added to the module +``` + +#### FEATURES: + +Add-JCGsuiteMember - Add a user or user group to a Gsuite instance +Add-JCOffice365Member - Add a user or user group to an Office365 instance +Remove-JCGsuiteMember - Remove a user or user group from a Gsuite instance +Remove-JCOffice365Member - Remove a user or user group from an Office365 instance + + ## 2.9.1 -Release Date: January 2, 2024 +Release Date: January 11, 2024 #### RELEASE NOTES