Skip to content
Jan Ryen

Jan Ryen

Learn from every failure and every success. Cultivate a Positive Mental Attitude.

Jan Ryen

  • About
  • Blog
  • Readinglist
  • Twitter Feed

Find SMTP addresses using ActiveDirectory module in PowerShell

Share via:

  • Facebook
  • Twitter
  • LinkedIn
  • Email
  • Copy Link
  • More

PowerShell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# On a DC, in Powershell:
#See all smtp addresses for specific AD User
Get-ADObject -Properties proxyAddresses -Filter {samaccountname -eq "ADUserSamAccountName"} | select -ExpandProperty proxyaddresses
 
#See all smtp addresses by searching for parts of an smtp address
Get-ADObject -Properties mail, proxyAddresses -Filter {mail -like "*portionOfMailAddress*"} | select -ExpandProperty proxyaddresses
 
 
# If you have RSAT ( which you should ) on your own PC:
#get the credetial of an administrative user
$cred = Get-Credential DOMAIN\User
 
# Import the Active Directory Module
Import-Module ActiveDirectory
 
#See all smtp addresses for specific AD User
Get-ADObject -Credential $cred -Properties proxyAddresses -Filter {samaccountname -eq "ADUserSamAccountName"} | select -ExpandProperty proxyaddresses
 
#See all smtp addresses by searching for parts of an smtp address
Get-ADObject -Credential $cred -Properties mail, proxyAddresses -Filter {mail -like "*portionOfMailAddress*"} | select -ExpandProperty proxyaddresses

 

Share via:

  • Facebook
  • Twitter
  • LinkedIn
  • Email
  • Copy Link
  • More
  • ← How to get server core to always start with powershell on login
  • Get last logged on user with PowerShell →

Please Follow:

  • LinkedIn
  • Parler
  • Twitter
  • Reddit

Recent Posts

  • [Solved] NIC error modern UI – Windows cannot access …
  • Automate set up of first Active Directory DC with powershell
  • What to memorize
  • Get Network card driver version remotely
  • Share folder with PowerShell

Categories

  • Business
  • DevOps
  • Hyper-V
  • KnowledgeBase
  • Linux
  • Powershell
  • Productivity
  • Windows Server
  • Windows Server 2012 R2
  • Terms of Service and Privacy Policy
  • Cookie Policy
© 2025 Jan Ryen | Designed by: Theme Freesia | Powered by: WordPress
  • Facebook
  • Twitter
  • LinkedIn
  • Email
  • Copy Link
  • More Networks
Share via
Facebook
X (Twitter)
LinkedIn
Mix
Email
Print
Copy Link
Powered by Social Snap
Copy link
CopyCopied
Powered by Social Snap