Hi Dhiraj

You could do vbs script that uses the put and set info commands to populate
the attributes.  The code would look something like this.

' Text file stuff to define the file to open to read, and to build an error
file
 on error resume next
Set fso = CreateObject("Scripting.FileSystemObject")
Set fso2 = CreateObject("Scripting.FileSystemObject")
set errfyle = fso2.createtextfile("errorfyle.txt",true)
errfyle.close
set errfyle = fso2.opentextfile("errorfyle.txt",8,true)
set myreadfyle = fso.opentextfile(<fylenam with data>)
 While Not myreadfyle.AtEndOfStream
fyleline = myreadfyle.readline
' Create an array called acctarray that contains the DN as value
acctarray(0) and the new attribs as values 1 - x
acctarray=split(fyleline,chr(9))

set objuser=getobject("LDAP://"&trim(acctarray(0))
if err<>0 then
      err=0
' Do this section or each attribute, or call a function and then feed it
the attributename and the acctarray(x)
'
**************************************************************************************
      objuser.put <attributename>,acctarray(1)
      objuser.setinfo
      if err<>0 then
            errfyle.writeline acctarray(0) & " : Error setting attribute
<attributename>"
            err=0
      end if
'
************************************************************************************
else
      errfyle.writeline acctarray(0) & " : Object does not exist"
end if
wend

Script assumes the data is tab delimited and the first column is the DN of
the user you are changing.  Additional columns would be the attributes you
are changing.  attributename is the name of the attribute that you can read
via. ADSIEdit (ie. Samaccountname is the pre Win2K logon name).  This is
basically a scaled down version of the custom one I used for a migration -
it probably needs some customization for your environment.

Regards;

James R. Day
Active Directory Core Team
Office of the Chief Information Officer
National Park Service
202-354-1464
202-230-2983 (CEL)
[EMAIL PROTECTED]


                                                                           
             "Haritwal,                                                    
             Dhiraj"                                                       
             <Dhiraj.Haritwal@                                          To 
             ap.sony.com>              <ActiveDir@mail.activedir.org>      
             Sent by:                                                   cc 
             [EMAIL PROTECTED]                                             
             ail.activedir.org                                     Subject 
                                       RE: [ActiveDir] Import User Details 
                                       from a XLS file                     
             12/04/2006 07:02                                              
             PM ZE5B                                                       
                                                                           
                                                                           
             Please respond to                                             
             [EMAIL PROTECTED]                                             
                tivedir.org                                                
                                                                           
                                                                           




Dear Thomas/Brian,

I am waiting for your reply. Kindly send me the solution. I know how to
import through ldifde & csvde but my problem is I have to modify some
properties of all users like their contact no, department, location
etc.... I cannot understand what condition has to be set to modify their
properties.

If anyone else is having any idea, kindly send me ASAP.

Dhiraj Haritwal


-----Original Message-----
From: Haritwal, Dhiraj
Sent: Friday, December 01, 2006 10:05 AM
To: 'ActiveDir@mail.activedir.org'
Subject: RE: [ActiveDir] Import User Details from a XLS file


Dear Thomas/Brian,

Thanks for ur reply. But I want to add some information (Attributes)
with existing users. Like I wanaa add Contact No, location, Department
etc... to the existing users from an Excel file.

Thanks,

Dhiraj Haritwal


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thomas Hess
Sent: Thursday, November 30, 2006 9:31 PM
To: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] Import User Details from a XLS file

Hi Dhiraj,

see MS KB237677 for
Using LDIFDE to import and export directory objects to Active Directory

http://support.microsoft.com/kb/237677/en-us

Greetings
Thomas
2006/11/30, Haritwal, Dhiraj <[EMAIL PROTECTED]>:
>
>
>
> Dear All,
>
>
>
> How can I import, AD Users Details like Department, Telephone No,
Location
> etc... from an XLS file.
>
>
>
> Dhiraj Haritwal
>
>
>
> ________________________________
>
> This email is confidential and intended only for the use of the
individual
> or entity named above and may contain information that is privileged.
If you
> are not the intended recipient, you are notified that any
dissemination,
> distribution or copying of this email is strictly prohibited. If you
have
> received this email in error, please notify us immediately by return
email
> or telephone and destroy the original message. - This mail is sent via
Sony
> Asia Pacific Mail Gateway.________________________________
>
List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir@mail.activedir.org/




-------------------------------------------------------------------
This email is confidential and intended only for the use of the individual
or entity named above and may contain information that is privileged. If
you are not the intended recipient, you are notified that any
dissemination, distribution or copying of this email is strictly
prohibited. If you have received this email in error, please notify us
immediately by return email or telephone and destroy the original message.
- This mail is sent via Sony Asia Pacific Mail Gateway.
-------------------------------------------------------------------
List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir@mail.activedir.org/


List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir@mail.activedir.org/

Reply via email to