Change Custome Attribute of AD users use PowerShell script

Houman Alavehzadeh 0 Reputation points
2023-04-20T03:00:22.6233333+00:00

Today I received a ticket requesting to change one of the Custome Attributed in Active Directory. My first issue is the number of users is too much, and I need to find out what value set those users. I tried to run the PowerShell script but could not find that Attribute in the result. Does anyone know how to see a custom attribute's value? User's image

Windows for business Windows Client for IT Pros Directory services Active Directory
Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 47,901 Reputation points
    2023-04-20T13:46:58.9966667+00:00

    Try this to see the value of that property:

    Get-ADUser <user> -Property extensionAttribute15
    
    0 comments No comments

  2. Limitless Technology 44,751 Reputation points
    2023-04-20T15:17:39.9466667+00:00

    Hi, I'd be happy to help you out with your question. Sorry for the inconvenience caused. To view the value of a custom attribute in Active Directory, you can use the PowerShell cmdlet Get-ADUser. You'll need to include the -Properties parameter and specify the attribute you want to retrieve. For example, if you want to retrieve the extensionAttribute15 value for all user accounts, you can use the following command: Get-ADUser -Filter * -Properties extensionAttribute15 | Select Name, extensionAttribute15 This command will retrieve all user accounts and display their extensionAttribute15 value (if set) in the console. To update the extensionAttribute15 value for multiple users, you can use the Set-ADUser cmdlet. Again, you'll need to include the -Properties parameter and specify the attribute you want to update. Here's an example command that will set the extensionAttribute15 value for all user accounts to "NewValue": Get-ADUser -Filter * | Set-ADUser -Properties @{extensionAttribute15="NewValue"} It's important to note that you'll need appropriate permissions to modify user attributes in Active Directory. So, make sure that you have the necessary permissions before attempting to update the attribute values. If you have any other questions or need assistance with anything, please don't hesitate to let me know. I'm here to help.

    If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.