Skip to content

Instantly share code, notes, and snippets.

@brifiction
Last active November 29, 2019 04:28
Show Gist options
  • Save brifiction/0d9861fce29e71232cc9685cae1f252a to your computer and use it in GitHub Desktop.
Save brifiction/0d9861fce29e71232cc9685cae1f252a to your computer and use it in GitHub Desktop.
Exchange Online - Find Recipient via Unified Messaging (UM) (Extension Number)

Exchange Online - Find Recipient via Unified Messaging (UM) (Extension Number)

  1. Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files. Simply run:
Set-ExecutionPolicy RemoteSigned

You need to configure this setting only once on your computer, not every time you connect.

  1. Define your Exchange Online authentication:
$UserCredential = Get-Credential

It should be email address and password.

  1. Next, define your session such as:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $UserCredential -Authentication Basic -AllowRedirection
  1. Next, import commands by executing Import-PSSession $Session -DisableNameChecking.
  2. Finally, define your EUM extension number to start a recipient search:
Get-Recipient -ResultSize Unlimited | where{$_.emailaddresses -like *EUM:*1234*} | fl displayname,emailaddresses

References:

  1. Connect to Exchange Online PowerShell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment