{"id":44251,"date":"2020-02-23T09:00:00","date_gmt":"2020-02-23T16:00:00","guid":{"rendered":"https:\/\/jumpcloud.com\/?p=44251"},"modified":"2024-02-02T13:37:41","modified_gmt":"2024-02-02T18:37:41","slug":"powershell-custom-user-attributes","status":"publish","type":"post","link":"https:\/\/jumpcloud.com\/blog\/powershell-custom-user-attributes","title":{"rendered":"Adding Custom User Attributes with PowerShell"},"content":{"rendered":"\n
IT admins are responsible for a number of provisioning tasks \u2014 not just provisioning new users to their resources but also provisioning existing users to new resources, like a new application the organization has decided to use.<\/p>\n\n\n\n
Each SaaS app requires a unique set of user attributes to create accounts, and user attributes should ideally be populated from the central directory to the requisite app via single sign-on (SSO) connectors. But what happens when the app requires a custom user attribute that\u2019s not already stored in the core directory?<\/p>\n\n\n\n
Admins have a few options for adding custom attributes to their directory, depending on which directory they use. One of those options is PowerShell, an automation management language. <\/p>\n\n\n\n
Admins managing an Active Directory\u00ae<\/sup> (AD) instance can modify the AD schema via tools like Windows Registry, but this process requires careful consideration and execution. There\u2019s a thorough step-by-step guide here<\/a> \u2014 though admins should consider testing schema changes before implementing them on production domain controllers.<\/p>\n\n\n\n Once an admin has added the custom attribute to the schema, they can then modify the attribute for an individual user with the Set-ADUser cmdlet<\/a> in PowerShell or in bulk through a CSV import into AD. <\/p>\n\n\n\n However, various challenges exist in this process, and updating your AD schema is not a task to be taken lightly, as there\u2019s no straightforward way to undo the changes should you need to for any reason. Beyond that, AD does not federate core identities to SaaS apps natively. Instead, admins will need to seek a third-party SSO solution to extend their user identities to cloud resources.<\/p>\n\n\n\n JumpCloud\u2019s Directory-as-a-Service\u00ae<\/sup> has an integrated PowerShell module for automation and bulk tasks. JumpCloud serves as a full-suite directory in the cloud, and admins can choose whether to control the directory from the web-based UI console or various other options, like the PowerShell module.\u00a0<\/p>\n\n\n\n The module allows admins to add and modify custom user attributes at scale. You can accomplish this by uploading a CSV with the new attributes to JumpCloud. You represent custom attributes by adding two columns for each attribute: one column to signify the attribute name and one column to signify the attribute value.\u00a0<\/p>\n\n\n\n This is all achieved via PowerShell, the attribute is then reflected for each user in the JumpCloud console.<\/p>\n\n\n\n This process is streamlined and far more efficient than modifying custom attributes one by one, particularly if you have more than a handful of employees. You can also use the PowerShell module to import AD users into JumpCloud,<\/a> preserve their AD attributes, and add any custom attributes necessary during their import, as well. JumpCloud offers a catalog of hundreds of pre-configured SSO connectors<\/a> to popular SaaS apps, as well as a generic SAML connector for apps outside the catalog.<\/p>\n\n\n\n From JumpCloud, you can then provision users to their systems (Mac\u00ae<\/sup>, Window\u00ae<\/sup>, and Linux\u00ae<\/sup>), apps, networks, and file servers \u2014 and virtually any other IT resource \u2014 via cloud LDAP, cloud RADIUS, and SAML.\u00a0<\/p>\n\n\n\n Learn about other provisioning use cases where the JumpCloud PowerShell module is particularly useful<\/a>, or take a look at JumpCloud engineer Scott Reed\u2019s advanced import tutorial below:<\/p>\n\n\n\nAdding a Custom Attribute in JumpCloud<\/h2>\n\n\n\n