You'll need the Exchange Online module for that: https://learn.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps
powershell to retrive recipient from AD, AzureAD & M365 (MSOL)
We are having issues with our dirsync and we need to find the duplicate/rogue entries on Active Directory, M365 and AzureAD
The user is user01@keyman .com
We tried Get-Recipient -user01@keyman .com but it says not recognized as name of a cmdlet.
New to Powershell so would appreciate if you can help me in identifying how to retrieve this info from AD, MSOL (M365) and AzureAD as we need to remove these rogue/duplicate entries.
3 answers
Sort by: Most helpful
-
-
VipulSparsh-MSFT 16,271 Reputation points Microsoft Employee
2020-11-16T06:23:27.26+00:00 @Sunith Philip Thanks for reaching out. As suggested by Michev, you would need the EXO module for powershell for this.
That is capable of querying the recipients info you are looking for :
-----------------------------------------------------------------------------------------------------------------
If the suggested response helped you resolve your issue, please do not forget to accept the response as Answer and "Up-Vote" for the answer that helped you for benefit of the community.
-
Lydia Zhou - MSFT 2,376 Reputation points Microsoft Employee
2020-11-19T02:11:17.34+00:00 Get-Recipient is available for Exchange PowerShell. Please check the article provided by michev to load the EXO V2 module and connect to Exchange Online PowerShell, then Get-Recipient should work for you.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.