Search EggHeadCafe's Job Board
EggHeadCafe Silverlight WPF ASP.NET VB.NET C# Excel SQL Server SharePoint
search
Windows 2003 Server GroupsView
Windows Server Active_Directory
Windows Server Dfs_Frs
Windows Server Dns
Windows Server General
Windows Server Migration
Windows Server Networking
Windows Server Sbs
Windows Server Scripting
Windows Server Security
Windows Server Setup
Windows Server Clustering
Windows Server Update_Services

Group SummariesView
.NET Framework
Access
BizTalk
Certifications
CRM
DDK
Exchange Server
FoxPro
French
French .NET
Games
German
German .NET
Graphic Design
IIS
Internet
ISA Server
Italian
Italian .NET
Maps
MCIS
Miscellaneous
Mobile Apps
Money
MSN
Networking
Office
Ops Mgr
Publisher
Security
SharePoint
Small Business
Spanish
Spanish .NET
SQL Server
Systems Management Server
Transaction Server
Virtual PC / Virtual Server
Visual Studio
Win32
Windows 2000
Windows 2003 Server
Windows 7
Windows Live
Windows Media
Windows Update
Windows Vista
Windows XP
 

View All Microsoft Windows Server Active_Directory Posts  Ask A New Question 

Mass update of sapUsername attribute

sin.e.bouli posted on Wednesday, June 11, 2008 3:27 PM

Hi there,

I have a list of users (not all) in one of my OUs that I need to update
by adding the attribute sapUsername with the value specific for them.

e.g.

sAMAccountName is Test.User1 then sapUsername is TUSER1


sAMAccountName is Test.User2 then sapUsername is TUSER2


However, i have over 300 users to update and doing this manually is not
an ideal situation! Is their any way i can mass upload these?

Thanks,

Bouli


--
sin.e.bouli
------------------------------------------------------------------------
sin.e.bouli's Profile: http://forums.techarena.in/member.php?userid=51422
View this thread: http://forums.techarena.in/showthread.php?t=984659

http://forums.techarena.in
reply

 

Mass update of sapUsername attribute

Tomasz Onyszko posted on Wednesday, June 11, 2008 5: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)
reply

Thanks for these updates - i will try out and let you know how i get on!

sin.e.bouli posted on Thursday, June 12, 2008 4:21 PM

Thanks for these updates - i will try out and let you know how i get on!


--
sin.e.bouli
------------------------------------------------------------------------
sin.e.bouli's Profile: http://forums.techarena.in/member.php?userid=51422
View this thread: http://forums.techarena.in/showthread.php?t=984660

http://forums.techarena.in
reply

 
 

Previous Microsoft Windows Server Active_Directory conversation.