Remove JCSystemUser - TheJumpCloud/support GitHub Wiki
Disables a JumpCloud User account on a JumpCloud System.
Remove-JCSystemUser [-Username] <String> -SystemID <String>
[<CommonParameters>]
Remove-JCSystemUser [-Username] <String> -SystemID <String> [-force]
[<CommonParameters>]
Remove-JCSystemUser -SystemID <String> -UserID <String>
[<CommonParameters>]
The Remove-JCSystemUser function allows you disable a JumpCloud managed local user account on a JumpCloud System. The Remove-JCSystemUser function tells the JumpCloud agent to set the managed local account into a disabled state. Note* The Remove-JCSystemUser does not delete the account or any data from the target machine.
PS C:\> Remove-JCSystemUser -Username cclemons -SystemID 5a0795nnie7127f4ev2erb154a
Removes the JumpCloud user with the Username 'cclemons' from the System with a SystemID of '5a0795nnie7127f4ev2erb154a'. A warning message will be presented to confirm this operation.
PS C:\> Remove-JCSystemUser -Username cclemons -SystemID 5a0795nnie7127f4ev2erb154a -force
Removes the JumpCloud user with the Username 'cclemons' from the System with a SystemID of '5a0795nnie7127f4ev2erb154a' using the -force Parameter. A warning message will not be presented to confirm this operation.
PS C:\> Get-JCSystemUser -SystemID 5a0795nnie7127f4ev2erb154a | Remove-JCSystemUser
Removes all JumpCloud users bound directly to the System with a System ID of '5a0795nnie7127f4ev2erb154a' using Parameter binding and the pipeline. A warning message will be displayed to confirm each remove operation.
PS C:\> Get-JCSystemUser -SystemID 5a0795nnie7127f4ev2erb154a | Remove-JCSystemUser -Force
Removes all JumpCloud users bound directly to the System with a System ID of '5a0795nnie7127f4ev2erb154a' using Parameter binding and the pipeline. A warning message will not be displayed to confirm each remove operation because of the presence of the -Force Parameter.
A SwitchParameter which suppresses the warning message when removing a JumpCloud user from a JumpCloud system.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: Force
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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. This is shown in EXAMPLES 3 and 4.
Type: System.String
Parameter Sets: (All)
Aliases: _id
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The _id of the User which you want to remove from 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 3 and 4.
Type: System.String
Parameter Sets: ByID
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The Username of the JumpCloud user you wish to remove from the JumpCloud system.
Type: System.String
Parameter Sets: ByName, Force
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
If a JumpCloud user is removed in error from a system using the Remove-JCSystemUser the error can be quickly remedied by running the Add-JCSystemUser command to re-enable the user.