Solved

Script to show user primary email address at login?

Posted on 2006-06-11
2
295 Views
Last Modified: 2011-10-03
Is there are VB or  any other script that shows user primary email address at login.

We have 1500 users with Windows 2003 and exchange 2003 AD environmnent.

Exchage is hosting 2 domains. So half of the users have 1 account and rest has other domain primary email account. I want to show users their primary email address at login.
Is there a way to display this information.

Thanks
IZAq
0
Comment
Question by:sqazi786
2 Comments
 
LVL 70

Accepted Solution

by:
Chris Dent earned 125 total points
ID: 16883827

Yep, it would have to be a message box; VbScript doesn't have much in the way of visual components.

You might also want to add error control so it can deal with users that don't have any e-mail addresses. Otherwise this is a very quick bit that'll return the primary:


Set objADSystemInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objADSystemInfo.UserName)

arrAddresses = objUser.GetEx("proxyAddresses")
For Each strAddress in arrAddresses
      If InStr(strAddress, "SMTP:") Then
            strAddress = Replace(strAddress, "SMTP:", "")
            Exit For
      End If
Next

MsgBox strAddress
0
 

Author Comment

by:sqazi786
ID: 16887134
Thanks chris, Exactly what i was looking for
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now