The Get-Recipient Office 365 command does not return anything
Those of you who use Promodag Reports to analyze an Office 365 environment may known that retrieval of the directory from the Cloud is carried out through PowerShell commands and particularly Get-Recipient , that allows by default to obtain a list of all recipients.
However, this command without parameters has not been working over the past few days. There is no error, just an empty list:
The command help remains the same and does not show any change in the syntax. A quick look at the command help page indicates that it should be correct. https://technet.microsoft.com/en-us/library/aa996921(v=exchg.160).aspx.
Seeing this, I tried to specify the type of recipient to retrieve, and found that it worked for the following types:
- Get-Recipient -RecipientType DynamicDistributionGroup
- Get-Recipient -RecipientType MailUser
- Get-Recipient -RecipientType MailContact
- Get-Recipient -RecipientType MailUniversalDistributionGroup
- Get-Recipient -RecipientType MailUniversalSecurityGroup
- Get-Recipient -RecipientType MailNonUniversalGroup
- Get-Recipient -RecipientType PublicFolder
But not with the UserMailbox type. The command always returned an empty list:
Get-Recipient -RecipientType UserMailbox
After some researches, I found that it was possible to retrieve all recipients or all mailboxes by adding the -Identity optional parameter with a wildcard.
Here is the syntax:
Get-Recipient -Identity "*" -ResultSize unlimited
Get-Recipient -Identity "*" -ResultSize unlimited -RecipientType UserMailbox
There you go:
It is unclear at present whether the command syntax has changed and now makes the -Identity parameter mandatory, or if this is a bug that will be fixed soon.
Meanwhile, the latest build of Promodag Reports (v.10.0.0463) takes the problem into account.
Please consult our homepage for more information about our products.
Free Fully Functional Evaluation Version
Download a Free Fully Functional Evaluation Version