Does anyone know a way to use Win32::OLE (or any other module, for that
matter) to pull the Active Directory field known as "E-mail" in AD Users and
Computers?  (The SMTP address associated with an account)

Up to this point, I've been shelling out to a VBS (I feel dirty).  A snippet
follows, as it may be of assistance:


On Error Resume Next
set objArgs=WScript.Arguments
strusername=objArgs(0)
strfullname=objArgs(1)
strMyOU=objArgs(2)

ldapstr="LDAP://cn="; & strusername & ",OU=Users,ou=" & strMyOU &
",ou=Support,dc=DIRECTV,dc=com"
Set objUser = GetObject (ldapstr)
objUser.GetInfo
strphnum = objUser.Get("mail")
WScript.echo "email: " & strphnum & " ##$"



Danke :)
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to