I was wondering if there is a way to update the 'Company' field for a large group of users within Active Directory? I would like to match all users with a company ending in a certain string.
It would take way too long to change this for each user individually.
Adjust the
dsquery
to target specific users as required.Edit: To match on a specific [sub-]string
Adjust the
*OLDCOMPANY
regex to suit your needs.Write a powershell script to change it for all users where the company = the old company name to the new company name.