Thursday, December 3, 2015

Powershell modify active directory user account data

Hi mates,
a customer asked me to do a quick operation on his Active Directory.
Practically the needs were :

1. add into a specific group a list of users retrieved from a TXT file
2. retrieve active directory users members from this group
3. for each user modify the description field for future usage maintaning the old value in case it exists



First step : merge the content (users) that appear inside of an existing TXT file with the ones already in the group

Second step : let's retrieve all users in the group :

Third and last step : modify the description for each single user in the group (maintaning the existing old one) :

Obviously it improvable for sure ! It's up to you and your specific needs.
But it's a base from which you can start for easy and quick tasks.
No complications, no tricks, only the essential.
Hope this helps.
See you soon

No comments:

Post a Comment