< Back

Add-JCSystemUser

Thu Jan 16, 2020 8:45 am

NAME Add-JCSystemUser



SYNOPSIS

Associates a JumpCloud User account with a local account on a JumpCloud managed System.





SYNTAX

Add-JCSystemUser [-Administrator <System.Boolean>] -SystemID <System.String> -UserID <System.String>

[<CommonParameters>]



Add-JCSystemUser [-Username] <System.String> [-Administrator <System.Boolean>] -SystemID <System.String>

[<CommonParameters>]





DESCRIPTION

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.





PARAMETERS

-Administrator <System.Boolean>

A boolean $true/$false value to set Administrator permissions on the target JumpCloud system



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



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



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



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 add to the JumpCloud system.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

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





System.Boolean







OUTPUTS

System.Object







NOTES









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



RELATED LINKS

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