Asked By Tomasz Onyszko
11-Jun-08 05:46 PM
Your favorite scripting language is Your solution. Or use combination of
cmd.exe, adfind.exe and admod.exe (last two from joe - www.joeware.net).
Assuming that You can have Your samaccountnames in a text file, each of
them in separate line, separated with semicolon from sapUsername.
Something like that:
samAccountname1;sapuser1
samaccountname2;sapuser2
samaccountname3;sapuser3
..
..
..
samaccountname300;sapuser300
You can use command line like this:
for /F "tokens=1,2* delims=;" %i in (sapUsernames.txt) do adfind.exe -b
dc=<domain>,dc=<tld> -s subtree -f "(&(samaccountname=%i))" -adcsv |
admod.exe sapUsername::%j
--
Tomasz Onyszko
http://www.w2k.pl/ - (PL)
http://blogs.dirteam.com/blogs/tomek/ - (EN)