The contains two commands designed to be used in tandem to update existing ºÚÁϺ£½Ç91Èë¿Ú users from a CSV file. The first command, , creates the CSV update template file on the local machine populated with ºÚÁϺ£½Ç91Èë¿Ú user information which admins can then add user updates to and import with the second command, .
If you want to create a CSV import file instead, refer to .
The ºÚÁϺ£½Ç91Èë¿Ú PowerShell Module can be installed on Mac, Windows and Linux devices in a few quick steps, see our GitHub repo, to learn more.
Using this update workflow, ºÚÁϺ£½Ç91Èë¿Ú Admins can:
- Add attributes to existing ºÚÁϺ£½Ç91Èë¿Ú users.
- Update attributes on existing ºÚÁϺ£½Ç91Èë¿Ú users.
- Add ºÚÁϺ£½Ç91Èë¿Ú users to ºÚÁϺ£½Ç91Èë¿Ú user groups.
- Bind ºÚÁϺ£½Ç91Èë¿Ú users to ºÚÁϺ£½Ç91Èë¿Ú devices with either standard or Admin system permissions.
- Add custom attributes* to ºÚÁϺ£½Ç91Èë¿Ú users.
By adding ºÚÁϺ£½Ç91Èë¿Ú users to ºÚÁϺ£½Ç91Èë¿Ú user groups, Admins can:
- Grant ºÚÁϺ£½Ç91Èë¿Ú users access to ºÚÁϺ£½Ç91Èë¿Ú SSO apps.
- Grant ºÚÁϺ£½Ç91Èë¿Ú users permissions to ºÚÁϺ£½Ç91Èë¿Ú Device Groups.
- Add ºÚÁϺ£½Ç91Èë¿Ú users to ºÚÁϺ£½Ç91Èë¿Ú LDAP and Radius.
- Add ºÚÁϺ£½Ç91Èë¿Ú users to the ºÚÁϺ£½Ç91Èë¿Ú Microsoft 365 or Google Workspace directory level integrations.
- Take over existing user accounts or provision new user accounts in Microsoft 365 or Google Workspace.
Custom attributes are only presented over the ºÚÁϺ£½Ç91Èë¿Ú API. Custom attributes aren't presented over ºÚÁϺ£½Ç91Èë¿Ú LDAP.
Creating the CSV Update File
The command creates a blank CSV update file that can be populated with ºÚÁϺ£½Ç91Èë¿Ú user information on a ºÚÁϺ£½Ç91Èë¿Ú admin's local machine.
To run the command, open a PowerShell terminal that has the module installed, and enter the PowerShell command at the prompt.
New-JCImportTemplate
Question 1
PS /Users/[user]> New-JCImportTemplate
cmdlet New-JCImportTemplate at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
Type:
Enter "Update" to begin updating the import template file.
The CSV file will be created within the directory:
:
/Users/[user]
Enter Y to confirm or N to change output location
This file is created within the current working directory of the PowerShell session by default. To create the file in this location, enter 'Y'. If you want to choose a different output location, enter 'N' and provide a full path to the folder where you want to create the file.
Question 2
Would you like to populate this update template with all of your existing users?
You can remove users you do not wish to modify from the import file after it is created.
Enter Y for Yes or N for No:
An update file can be populated with the usernames of all existing ºÚÁϺ£½Ç91Èë¿Ú users. Enter "Y" at this prompt to add all existing users to the CSV update file or "N" if you do not want to add this information to the file.
Question 3
Would you like to update users email addresses?
Enter Y for Yes or N for No:
Enter "Y" at this prompt to update existing users' email addresses in the CSV update file or "N" if you do not want to update this information.
Question 4
Do you want to add extended user information attributes available over ºÚÁϺ£½Ç91Èë¿Ú LDAP to your users during import?
Extended user information attributes include: AlternateEmail, Manager, ManagedAppleId, MiddleName, preferredName, jobTitle, employeeIdentifier, department, costCenter, company, employeeType, description, and location
Enter Y for Yes or N for No:
To add columns to the update file for updating extended user information attributes, enter "Y" at the prompt. Fields to update all extended user information attributes will be added to the update file. Only fields populated with information will be updated.
Question 5
Do you want to add extended user location attributes available over ºÚÁϺ£½Ç91Èë¿Ú LDAP to your users during import?
Extended user location attributes include: home_streetAddress, home_poBox, home_city, home_state, home_postalCode, home_country, work_streetAddress, work_poBox, work_city, work_state, work_postalCode, work_country
To add columns to the update file for updating location attributes, enter "Y" at the prompt. Fields to update all location attributes will be added to the update file. Only fields populated with information will be updated.
Question 6
Do you want to add extended user telephony attributes available over ºÚÁϺ£½Ç91Èë¿Ú LDAP to your users during import?
Extended user telephony attributes include: mobile_number, home_number, work_number, work_mobile_number, work_fax_number
To add columns to the update file for updating telephony attributes, enter "Y" at the prompt. Fields to update all telephony attributes will be added to the update file. Only fields populated with information will be updated.
Question 7
Do you want to set unix UID/GUID values during import?
UID/GUID value attributes include: unix_uid, unix_guid
Enter Y for Yes or N for No:
To add columns to the update file for UID/GUID values, enter "Y" at the prompt. Columns will be added to the update file. Only fields populated with information will be updated.
Question 8
Do you want to require MFA to user?
enable_user_portal_multifactor, EnrollmentDays
Enter Y for Yes or N for No:
To add columns to the update file for enabling MFA for User Portal logins and setting the number of enrollment days (enrollment period), enter "Y" at the prompt.
Question 9
Do you want to bind the user to LDAP during import
ldap_Binding_User, ldapserver_id
Enter Y for Yes or N for No:
To add columns to the update file for setting the LDAP BindDN and binding users to an LDAP server, enter "Y" at the prompt.
Question 10
Do you want to bind your users to existing ºÚÁϺ£½Ç91Èë¿Ú systems during import?
Enter Y for Yes or N for No:
By entering 'Y' at this prompt, you'll be asked for your ºÚÁϺ£½Ç91Èë¿Ú API Key. This API Key will be used to authenticate to the ºÚÁϺ£½Ç91Èë¿Ú API to create a CSV file in a current working directory containing all ºÚÁϺ£½Ç91Èë¿Ú devices and the SystemID for these devices. This file is named JCSystems_CurrentDate.csv.
Question 11
Do you want to add the users to ºÚÁϺ£½Ç91Èë¿Ú user groups during import?
Enter Y for Yes or N for No:
If 'Y',
What is the maximum number of custom attributes you want to add to a single user during import? ENTER A NUMBER:
Users can be added to ºÚÁϺ£½Ç91Èë¿Ú user groups during import. Note that if you want to add users to groups, these groups must already be created within the ºÚÁϺ£½Ç91Èë¿Ú Admin Portal. Enter 'Y' at this prompt to add columns in the CSV update file for group additions.
Question 12
Do you want to add any custom attributes to your users during import? Note, customAttribute values must be unique.
Enter Y for Yes or N for No:
Custom attributes are only presented over the ºÚÁϺ£½Ç91Èë¿Ú API. Custom attributes aren't presented over ºÚÁϺ£½Ç91Èë¿Ú LDAP. Enter 'Y' at this prompt if you want to add custom attributes to your users during import.
Question 13
Creating file JCUserUpdateImport_MM-DD-YYYY.csv in the location /Users/[user]
Do you want to open the file JCUserUpdateImport_MM-DD-YYYY.csv?
Enter Y for Yes or N for No:
After answering all questions, the update file will be located in the current working directory of the PowerShell session. Enter 'Y' at this prompt to open the file in the system's default CSV editor.
Populating the CSV Update File
After creating a CSV update file using the steps described above, ºÚÁϺ£½Ç91Èë¿Ú Admins can populate this CSV update file with their end user information and fill in the related fields for attributes, ºÚÁϺ£½Ç91Èë¿Ú device bindings, or ºÚÁϺ£½Ç91Èë¿Ú groups additions.
Expert Tips
- Only fields populated with info will get updated per user.
- Fields can be left blank.
- You don't need to add info for each user for each update field.
- If you're using a custom attribute "WorkdayID," note that each input value must be unique per user. See to learn more.
- It's very important that the column headings names are not modified or edited, as these values are dependencies for the
Update-JCUsersFromCSV
command.
The example below is a CSV file filled out with update info for three users:
"Username","mobile_number","home_number","work_number","work_mobile_number","work_fax_number"
nnickerson,123-456-777,,777,,
hflax,123-456-888,,888,,
dvickers,123-456-999,,999,,
Importing the CSV Update File
Once the update CSV template has been filled out with end user info and saved, it's ready to be imported using the command .
To run the command, open a PowerShell terminal and, at the prompt, enter the PowerShell command and put in your ºÚÁϺ£½Ç91Èë¿Ú API key to authenticate the PowerShell session to the ºÚÁϺ£½Ç91Èë¿Ú API.
Considerations:
- Your ºÚÁϺ£½Ç91Èë¿Ú API key can be found in the ºÚÁϺ£½Ç91Èë¿Ú Admin Portal. In the top right, click your initials, then My API Key. If you don't have API key access, see ºÚÁϺ£½Ç91Èë¿Ú APIs to learn more.
- Some attributes that can be updated via CSV require additional validation. See Use the Manager Attribute in the Admin Portal and API for more information.
Connect-JCOnline lu8792c9d4y2398is1tb6h0b83ebf0e92s97t382
Successfully connected to ºÚÁϺ£½Ç91Èë¿Ú
Module up-to-date. New LDAP attributes are live! Use Update-JCUsersFromCSV to add them in bulk.
After successfully connecting to ºÚÁϺ£½Ç91Èë¿Ú, in the terminal go to the location of the update CSV file.
PS /Users/buster/Desktop/Import Files> dir
Directory: /Users/buster/Desktop/Update Files
Mode LastWriteTime Length Name
---- ------------- ------ ----
------ 9/28/18 1:12 PM 443 JCUserUpdateImport_09-28-2018.csv
The 'dir' command which is alias for the command returns all the items in the current directory.
In this example you'll see the update CSV file 'JCUserUpdateImport_09-28-2018.csv' is within the current directory.
Next, run the command and enter the full path to the CSV update file to the -CSVFilePath parameter.
If you have navigated to the directory where the CSV file lives in the PowerShell session all that must be entered for this parameter is the name of the CSV import file.
Update-JCUsersFromCSV -CSVFilePath ./JCUserUpdateImport_09-28-2018.csv
The CSV file will be validated and admins will be presented with a 'Y'/'N' prompt to confirm the update or quit.
Import Summary:
Number Of Users To Update = 3
Would you like to update these users?
Press Y to confirm or N to quit:
If 'Y' is entered, Admins will be presented with a update summary after the update completes.
A loading bar will show progress of the update.
Import Summary:
Number Of Users To Update = 3
Would you like to update these users?
Press Y to confirm or N to quit: y
Username : nnickerson
Status : User Updated
UserID : 5b4781bce3c61c2f3940f2b6
GroupsAdd : {}
SystemID :
SystemAdd :
Username : hflax
Status : User Updated
UserID : 5b4781bc4907674a1e7bc382
GroupsAdd : {}
SystemID :
SystemAdd :
Username : dvickers
Status : User Updated
UserID : 5b4781bd23e457661be364ca
GroupsAdd : {}
SystemID :
SystemAdd :