Scripting help - need to get phone number of AD accounts and then add them to contacts in trusted domain
Posted
by
TheCleaner
on Server Fault
See other posts from Server Fault
or by TheCleaner
Published on 2012-03-29T20:51:32Z
Indexed on
2012/03/29
23:32 UTC
Read the original article
Hit count: 235
I have domain accounts that I have created as contacts in another trusted domain so that they can see them in their Exchange GAL.
I need a way to extract the phone number field from UserA (user account) in DomainA and import it into UserA (contact) in DomainB.
I get the logic, it's just the code (vbscript/powershell/whatever) that eludes me.
The logic as I see it:
- Connect to source AD (ou/subtree)
- Extract user accounts from OU and subcontainers including first name, last name, display name, and phone number
- Connect to target AD (ou/subtree)
- Verify/match contact with extract in #2 above based on display name
- Update phone field with phone number in extract
- Write log of success and failures
Anybody able to help?
© Server Fault or respective owner