Skip to content

Remove JCSystemUser

Joe Workman edited this page Sep 29, 2020 · 11 revisions

Remove-JCSystemUser

SYNOPSIS

Disables a JumpCloud User account on a JumpCloud System.

SYNTAX

ByName (Default)

Remove-JCSystemUser [-Username] <String> -SystemID <String> [<CommonParameters>]

Force

Remove-JCSystemUser [-Username] <String> -SystemID <String> [-force] [<CommonParameters>]

ByID

Remove-JCSystemUser -SystemID <String> -UserID <String> [<CommonParameters>]

DESCRIPTION

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.

EXAMPLES

Example 1

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.

Example 2

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.

Example 3

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.

Example 4

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.

PARAMETERS

-force

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

-SystemID

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

-UserID

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

-Username

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

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.

INPUTS

System.String

OUTPUTS

System.Object

NOTES

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.

RELATED LINKS

Quick Links

Command Reference

Authentication

Import and Backup

RADIUS Reply Attributes

User Functions

System Functions

Command Functions

Group Functions

Policy Functions

Clone this wiki locally