Get email address of current logged in user

2

On my machine (windows 7) I want to set a registry key with the current logged in user email address (e.g. firstname.lastname@mydomain.com). Basically I want to install LYNC silently and predefine the log on name. Is there any CMD.exe command to get the email address? Or a RegKey? ADS?

I have Outlook installed and configured. Maybe it is possible to get the mail address from outlook registry?

Jan Hommes

Posted 2014-11-05T13:54:22.243

Reputation: 141

This part of a domain? – Ramhound – 2014-11-05T14:10:14.280

@MSX: I updated my question. Hope it is clear now. – Jan Hommes – 2014-11-05T14:19:06.960

Answers

3

No need to create a registry entery.

On CMD run whoami /upn

Francesco Mantovani

Posted 2014-11-05T13:54:22.243

Reputation: 248

2Great answer. Thanks for a solution without unnecessary dependencies. – Nick Painter – 2019-03-26T20:52:11.207

2

You could use LDAP search with powershell to get the mailbox address. http://technet.microsoft.com/en-us/library/ff730967.aspx

POLLOX

Posted 2014-11-05T13:54:22.243

Reputation: 39