- 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.
- Define your Exchange Online authentication:
$UserCredential = Get-Credential
It should be email address and password.
- Next, define your session such as:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $UserCredential -Authentication Basic -AllowRedirection
- Next, import commands by executing
Import-PSSession $Session -DisableNameChecking
. - Finally, define your EUM extension number to start a recipient search:
Get-Recipient -ResultSize Unlimited | where{$_.emailaddresses -like “*EUM:*1234*”} | fl displayname,emailaddresses
References: