< Back

New-JCUser

Thu Jan 16, 2020 9:07 am

NAME New-JCUser



SYNOPSIS

Creates a JumpCloud User





SYNTAX

New-JCUser -Attribute1_name <System.String> -Attribute1_value <System.String> -Attribute2_name <System.String>

-Attribute2_value <System.String> [-NumberOfCustomAttributes <System.Int32>] [-allow_public_key <System.Boolean>]

[-company <System.String>] [-costCenter <System.String>] [-department <System.String>] [-description

<System.String>] [-displayname <System.String>] -email <System.String> [-employeeIdentifier <System.String>]

[-employeeType <System.String>] [-enable_managed_uid <System.Boolean>] [-enable_user_portal_multifactor {True |

False | $True | $False}] [-enrollmentDays <System.Int32>] -firstname <System.String> [-home_country

<System.String>] [-home_locality <System.String>] [-home_number <System.String>] [-home_poBox <System.String>]

[-home_postalCode <System.String>] [-home_region <System.String>] [-home_streetAddress <System.String>] [-jobTitle

<System.String>] -lastname <System.String> [-ldap_binding_user <System.Boolean>] [-location <System.String>]

[-middlename <System.String>] [-mobile_number <System.String>] [-password <System.String>]

[-password_never_expires <System.Boolean>] [-passwordless_sudo <System.Boolean>] [-sudo <System.Boolean>]

[-suspended <System.Boolean>] [-unix_guid <System.Int32>] [-unix_uid <System.Int32>] -username <System.String>

[-work_country <System.String>] [-work_fax_number <System.String>] [-work_locality <System.String>]

[-work_mobile_number <System.String>] [-work_number <System.String>] [-work_poBox <System.String>]

[-work_postalCode <System.String>] [-work_region <System.String>] [-work_streetAddress <System.String>]

[<CommonParameters>]





DESCRIPTION

The New-JCUser function creates a new JumpCloud user. Note a JumpCloud user must have a unique email address and

username. If a JumpCloud user is created without a password specified then the user will be created in an

'inactive state' and an activation email will be sent to the email address tied to the new account with

instructions to complete activation. If a password is set during user creation then no activation email is send

and the user is created in an active status. User activation can be seen in the boolean: 'activated' property of a

JumpCloud user.





PARAMETERS

-Attribute1_name <System.String>

Enter an attribute name



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Attribute1_value <System.String>

Enter an attribute value



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Attribute2_name <System.String>

Enter an attribute name



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Attribute2_value <System.String>

Enter an attribute value



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-NumberOfCustomAttributes <System.Int32>

If you intend to create users with Custom Attributes you must declare how many Custom Attributes you intend to

add. Based on the NumberOfCustomAttributes value two Dynamic Parameters will be created for each Custom

Attribute: Attribute_name and Attribute_value with an associated number. See an example for adding a user with

two Custom Attributes in EXAMPLE 3



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-allow_public_key <System.Boolean>

A boolean $true/$false value for allowing pubic key authentication



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-company <System.String>

Specifies the user's company. The LDAP displayName of this property is company.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-costCenter <System.String>

Specifies the user's costCenter. The LDAP displayName of this property is businessCategory.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-department <System.String>

Specifies the user's department. The LDAP displayName of this property is departmentNumber.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-description <System.String>

Specifies the user's description. The LDAP displayName of this property is description. This field is limited

to 1024 characters.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-displayname <System.String>

Specifies the user's preferredName. The LDAP displayName of this property is displayName.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-email <System.String>

The email address for the user. This must be a unique value.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-employeeIdentifier <System.String>

Specifies the user's employeeIdentifier. The LDAP displayName of this property is employeeNumber. Note this

field must be unique per user.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-employeeType <System.String>

Specifies the user's employeeType. The LDAP displayName of this property is employeeType.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-enable_managed_uid <System.Boolean>

A boolean $true/$false value for enabling managed uid



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-enable_user_portal_multifactor <System.String>

A boolean $true/$false value for enabling MFA at the user portal



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-enrollmentDays <System.Int32>

A dynamic parameter that can be set only if -enable_user_portal_multifactor is set to true. This will specify

the enrollment period for users for enrolling into MFA via the users console. The default is 7 days if this

value is not specified.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-firstname <System.String>

The first name of the user



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-home_country <System.String>

Specifies the user's country on the home address object. This property is nested within the LDAP property with

the displayName homePostalAddress.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-home_locality <System.String>

Specifies the user's city on their home address object. This property is nested within the LDAP property with

the displayName homePostalAddress.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-home_number <System.String>

Specifies the user's home number. The LDAP displayName of this property is homePhone.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-home_poBox <System.String>

Specifies the user's poBox on their home address object. This property is nested within the LDAP property with

the displayName homePostalAddress.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-home_postalCode <System.String>

Specifies the user's postalCode on their home address object. This property is nested within the LDAP property

with the displayName homePostalAddress.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-home_region <System.String>

Specifies the user's state on their home address object. This property is nested within the LDAP property with

the displayName homePostalAddress.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-home_streetAddress <System.String>

Specifies the user's streetAddress on their home address object. This property is nested within the LDAP

property with the displayName homePostalAddress.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-jobTitle <System.String>

Specifies the user's home number. The LDAP displayName of this property is title.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-lastname <System.String>

The last name of the user



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ldap_binding_user <System.Boolean>

A boolean $true/$false value to enable the user as an LDAP binding user



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-location <System.String>

Specifies the user's home location. The LDAP displayName of this property is physicalDeliveryOfficeName.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-middlename <System.String>

Specifies the user's home location. The LDAP displayName of this property is initials.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-mobile_number <System.String>

Specifies the user's mobile number. The LDAP displayName of this property is mobile.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-password <System.String>

The password for the user



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-password_never_expires <System.Boolean>

A boolean $true/$false value for enabling password_never_expires



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-passwordless_sudo <System.Boolean>

A boolean $true/$false value if you want to enable passwordless_sudo



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-sudo <System.Boolean>

A boolean $true/$false value if you want to enable the user to be an administrator on any and all systems the

user is bound to.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-suspended <System.Boolean>

A boolean $true/$false value for putting the account into a suspended state



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-unix_guid <System.Int32>

The unix_guid for the new user. Note this value must be an number.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-unix_uid <System.Int32>

The unix_uid for the new user. Note this value must be an number.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-username <System.String>

The username for the user. This must be a unique value. This value is not modifiable after user creation.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-work_country <System.String>

Specifies the user's country on the work address object. This property is nested within the LDAP property with

the displayName postalAddress.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-work_fax_number <System.String>

Specifies the user's work fax number. The LDAP displayName of this property is facsimileTelephoneNumber.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-work_locality <System.String>

Specifies the user's city on their work address object. The LDAP displayName of this property is l.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-work_mobile_number <System.String>

Specifies the user's work mobile number. The LDAP displayName of this property is pager.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-work_number <System.String>

Specifies the user's work number. The LDAP displayName of this property is telephoneNumber.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-work_poBox <System.String>

Specifies the user's poBox on their work address object. The LDAP displayName of this property is

postOfficeBox.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-work_postalCode <System.String>

Specifies the user's postalCode on their work address object. The LDAP displayName of this property is

postalCode.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-work_region <System.String>

Specifies the user's state on their work address object. This property is nested within the LDAP property with

the displayName postalAddress.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-work_streetAddress <System.String>

Specifies the user's streetAddress on their work address object. This property is nested within the LDAP

property with the displayName postalAddress.



Required? false

Position? named

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





System.Int32







OUTPUTS

System.Object







NOTES









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



RELATED LINKS

Online Version: https://github.com/TheJumpCloud/support/wiki/New-JCUser