Solved

Script to show user primary email address at login?

Posted on 2006-06-11
2
293 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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

19 Experts available now in Live!

Get 1:1 Help Now