Put samid and other user fields in columns, then generate other columns as needed from existing column. like Displayname from FN and LN using formula =CONCATENATE(B2," ",C2)
then at the end concatenate everything into single column using * as separator
formula : =CONCATENATE(A2,"*",B2,"*",C2,"*",D2)
| SamID | FN | LN | DisplayName | TextToCopy |
| user1 | User | 1 | User 1 | user1*User*1*User 1 |
| user2 | User | 2 | User 2 | user2*User*2*User 2 |
| user3 | User | 3 | User 3 | user3*User*3*User 3 |
| user4 | User | 4 | User 4 | user4*User*4*User 4 |
| user5 | User | 5 | User 5 | user5*User*5*User 5 |
Then once ready with data, copy the content of last column into text file.(texttocopy.txt)
and run batch file something like
for /F "Tokens=1-4 Delims=*" %%A in (TexttoCopy.txt) do (
dsquery user -samid %%A | dsmod user -fn "%%B" -ln "%%C" -Display "%%D"
)
I hope this helps
--
Kamlesh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Be the change you want to see in the World"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On 12/14/05, Phil Renouf <[EMAIL PROTECTED]> wrote:
Gotcha, too bad because doing this sort of thing with admodify is great.What I've done in the past is use some excel formulas to build a dsmod command, then just put that in a batch file to update each user. Not pretty, but it works.Phil
On 12/13/05, CHIANESE, DAVID <[EMAIL PROTECTED] > wrote:They are all caps and I want them proper case. Or actually management wants them that way. :)We have this:On 12/13/05, CHIANESE, DAVID < [EMAIL PROTECTED]> wrote:We want this:On 12/13/05, Chianese, David < [EMAIL PROTECTED]> wrote:
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Phil Renouf
Sent: Tuesday, December 13, 2005 2:02 PM
To: [email protected]
Subject: Re: [ActiveDir] csv to ldf converter
How are your Display names formatted? Are they say: Firstname Lastname, or Lastname, Firstname? Are the first name and last name fields in the users populated and do they have the correct case?
If so then AD Modify should fix that as you can tell it to build the Display Name from the Firstname and Lastname fields.If not then this won't help and I'll go back to what I was doing...actually either way I'll go back to what I was doing ;)Phil
On 12/13/05, CHIANESE, DAVID <[EMAIL PROTECTED] > wrote:I just found that admodify.net cannot do what I want either. Basically if you look at my display name in e-mail here, it is all caps.. so... In a csvde directory export of all users and using a well known excel function (=proper(A1)) I am able to give proper case to each field I want to change. So I have that part done, all DN, SN, CN and other capitalized fields have been reworked to proper case fields. The trouble I am having is converting the .csv file to .ldf so I can then modify these attributes in the directory using ldifde.If anyone would like to look at my current spreadsheet that does this conversion (well it used to anyway), I would be happy to send a copy off list. Scripting in Excel/VB is not my forte.Regards,Dave
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Brian Desmond
Sent: Tuesday, December 13, 2005 1:10 PM
To: [email protected]
Subject: RE: [ActiveDir] csv to ldf converter
You could just use csvde to do the import/export if that's what you're trying to do….
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of CHIANESE, DAVID
Sent: Tuesday, December 13, 2005 1:05 PM
To: [email protected]
Subject: [ActiveDir] csv to ldf converter
Would anybody have a handy csv to ldif macro for excel 2003? The one I have no longer functions. Even a .csv file to .ldf file conversion tool would help. TIA!
Regards,
Dave
--
