Propagating "Email Address" automatically in AD

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

Hi,

By the way, I've just come back from my completed & passed
70-217 MCSE exam and one of the questions asked was a
newsgroup question posted yesterday, so thanks to everyone
who help out in this group. :)

My question is this: I've got 1200 users in Active
Directory, and would like to use Active Directory with
Outlook Express as a directory lookup tool.

How can I automatically fill out everyone's email address
with the format %username%@domain.com?

I've tried ADMODIFY but to no avail, as it only seems to
modify Exchange properties, but this isn't an Exchange
email server we use.

Thanks in advance...

Daniel
 
Hi,

By the way, I've just come back from my completed & passed
70-217 MCSE exam and one of the questions asked was a
newsgroup question posted yesterday, so thanks to everyone
who help out in this group. :)

My question is this: I've got 1200 users in Active
Directory, and would like to use Active Directory with
Outlook Express as a directory lookup tool.

How can I automatically fill out everyone's email address
with the format %username%@domain.com?

I've tried ADMODIFY but to no avail, as it only seems to
modify Exchange properties, but this isn't an Exchange
email server we use.

Thanks in advance...

Daniel

Assumning username has no spaces, and you have a Windows XP client or a Windows
Server 2003 member or DC,
and your Domain is Windows 2000 SP3+ or Windows Server 2003, them
from XP or W2K3, run:

@echo off
setlocal
set qry=dsquery * domainroot -filter
"(&(objectCategory=Person)(objectClass=User))"
-attr sAMAccountName distinguishedName -limit 0
REM the above set command is 1 line
for /f "Skip=1 Tokens=1*" %%a in ('%qry%') do (
call :mod %%a "%%b"
)
endlocal
goto :EOF
:mod
set dn=%2
set dn=%dn: =%
set dn=%dn: =%
set dn=%dn: "="%
dsmod user %dn% -email %1@%userdnsdomain%

Search for dsquery in the 'Tips & Tricks' at http://www.jsiinc.com


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top