< Back

Remove-JCSystemUser

Thu Jan 16, 2020 9:14 am

NAME Remove-JCSystemUser



SYNOPSIS

Disables a JumpCloud User account on a JumpCloud System.





SYNTAX

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



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



Remove-JCSystemUser [-Username] <System.String> -SystemID <System.String> [-force] [<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.





PARAMETERS

-SystemID <System.String>

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.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-UserID <System.String>

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.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Username <System.String>

The Username of the JumpCloud user you wish to remove from the JumpCloud system.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-force <System.Management.Automation.SwitchParameter>

A SwitchParameter which suppresses the warning message when removing a JumpCloud user from a JumpCloud system.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



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.



-------------------------- 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.



RELATED LINKS

Online Version: https://github.com/TheJumpCloud/support ... SystemUser