Re: Populate email attribute in AD

Tech-Archive recommends: Fix windows errors by optimizing your registry



You are right. With a vbscript in can run it in a command line real-time as
required. I have other OUs where I would like to use this script as well so
it would be preferable to pass the OU LDAP path as a command line argument.

"Marty List" wrote:

>
> "Ringo" <Ringo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:D6F63751-85AE-40E1-B231-620539AD9DF9@xxxxxxxxxxxxxxxx
> > Thank you Marty very much for your reply.
> > I do not have to use the CSV file. My understanding is a script will read
> > the CSV file for user display names, then find that user account in AD and
> > then populate the email field. Currently all users' email field is blank.
> > If the script encounters a blank username field it will skip that account,
> > similarly if an user account has only one name i.e JOHN and no last name,
> > the
> > email address will be john@xxxxxxxxxxx instead of
> > firstname.lastname@xxxxxxxxxxx format. If an account display name has any
> > unsupported characters such as a space, it will skip that account but
> > would
> > be nice to generate a text file with all failed/skipped accounts for
> > whatever
> > reason. If it encounters an account with uppercase, it would be nice to
> > convert them to lower case.
> >
> > Here is an example of the CSV file:
> > Name Type Description
> > John Doe User Marketing User
> >
> > The CSV is just an exported list from Windows 2003 AD user OU. It has a
> > header row, three columns - Name, Type and Description. The name is the
> > user
> > display name and not the user login name. For example, user display name
> > is
> > John Doe but his login name is JDoe. The email address for this user
> > should
> > be john.doe@xxxxxxxxxxx
> >
> > Much appreciated if you could halp me with this script.
> >
> > Many thanks
> > Ringo
>
>
> My suggestion then is to skip the CSV file, just enumerate the accounts in
> the OU in real time. This way you could run the script on a daily or weekly
> basis and clean up any accounts that were created with an incorrect email
> address. Let me know which design you prefer.
>
> I have a similar script written in VBScript that I can tweak to do what you
> want. Do you want the OU distinguished name (LDAP:// path) stored inside
> the script, or passed on the command line?
>
>
>
>
.



Relevant Pages

  • Re: Populate email attribute in AD
    ... > I do not have to use the CSV file. ... My understanding is a script will read ... > If the script encounters a blank username field it will skip that account, ... For example, user display name ...
    (microsoft.public.windows.server.scripting)
  • Re: Save As Macro
    ... I wasn't sure how you had your command line set up at the start so I ... You can also use drag and drop into the script or you ... I feed the script a csv file named ... The script opens the csv file in Excel, saves it as an xls file with the ...
    (microsoft.public.excel.programming)
  • Re: Populate email attribute in AD
    ... I do not have to use the CSV file. ... If the script encounters a blank username field it will skip that account, ...
    (microsoft.public.windows.server.scripting)
  • Re: exempt a machine from a group policy
    ... The computer name in an ACL normally only gets used when there is an attempt ... implicity authorize Modify access by the machine account. ... the script is NOT executed *by* a machine. ...
    (microsoft.public.windows.group_policy)
  • Re: problem with login
    ... login session" after I create their account. ... If your script is using the mkuser command, ...
    (comp.unix.aix)