Solved

Script to show user primary email address at login?

Posted on 2006-06-11
2
304 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 71

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

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

635 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