Avatar of Olevo
Olevo
Flag for Australia

asked on 

Need PowerShell script to update “Department” properties for all users belonging to a specific AD group

We have Windows 2012 R2 Active Directory Domain. “Department” field for some of the users in our domain needs to be updated with the appropriate department info.

Updating “Department” properties for all users in AD one by one will take long time. I need PowerShell script to do it automatically. I need PowerShell script based on Microsoft AD cmdlets not Quest cmdlets.

As an example, PowerShell should get the list of all users belonging to the “HR” AD group and add/update “Department” field of each AD account with the entry of “Human Resources Staff member”

Thanks in advance
Powershell

Avatar of undefined
Last Comment
George Kesler

8/22/2022 - Mon