Get a list of all email addresses

Using PS, how can I get a list of ALL email addresses on our Exchange Server(2010) remotely?

  • Alternatively, enter an email address to see if it exists on Exchange. If it doesn't, display a popup that it doesn't exist. If it does exist, display the mailbox & AD account.
  • By "remotely" are you using your laptop/desktop while onsite or through VPN to connect to the Exchange server or are you trying to do this through the public internet?

    If connected while onsite/VPN - You can install the Exchange Management Tools which are part of the Exchange 2010 install media which will allow you to obtain the Exchange Shell module. 

  • if you are inside the network, just use a implicit PSRemote session to your Exchange server, which proxies the Exchange cmdlets to your local host for the session, then just run the normal Exchange cmdlets to get what you are after. Get-Mailbox for example.

    Windows PowerShell: Implicit Remoting
    'technet.microsoft.com/en-us/library/ff720181.aspx

    Connect to Exchange servers using remote PowerShell
    'docs.microsoft.com/en-us/powershell/exchange/exchange-server/connect-to-exchange-servers-using-remote-powershell?view=exchange-ps'

    Create a new implicit remoting session on a remote Exchange 2010 server
    'gallery.technet.microsoft.com/office/Create-a-new-implicit-5fdafe45

    Remote PowerShell in Exchange 2013
    'blogs.technet.microsoft.com/nathanscott/2015/06/14/remote-powershell-in-exchange-2013

    Exchange Server 2013 PowerShell Implicit Remoting over the Internet using IIS ARR as the Reverse Proxy
    'social.technet.microsoft.com/wiki/contents/articles/31066.exchange-server-2013-powershell-implicit-remoting-over-the-internet-using-iis-arr-as-the-reverse-proxy.aspx'