Exporting Named Properties From Exchange Online Mailbox

An undocumented Exchange Online cmdlet came my way the other day – the “Get-MailboxExtendedProperty”. This returns all the named properties, or extended properties in the mailbox and can be exported to a file for review:

Get-MailboxExtendedProperty username | Export-CliXml MailboxExtendedProperties_username.xml

A mailbox should only have a few thousand of these, but if you get too many you exceed your named property quota and horrible things happen (Outlook wont open, you cannot send emails, etc.).

Using the above cmdlet to get the mailbox extended properties exported to a xml file, you can count the number of properties in your xml file:

$xml = Import-Clixml .\MailboxExtendedProperties_username.xml


If this is in the region of closer to 10,000 rather than 5,000 then you might have issues. For example running the following PowerShell:

Get-MailboxfolderStatistics username -FolderScope RecoverableItems | ft identity,folderandsubfoldersize

Might return things like this:

Get-MailboxFolderStatistics: |Microsoft.Exchange.Configuration.CmdletProxyException|Error on proxy command 'Get-MailboxFolderStatistics -Identity:'username' -FolderScope:'RecoverableItems' -skipCount:'0' -resultSize:'1000'' to server SERVERNAME.namprd15.prod.outlook.com: Server version 15.20.7698.0000, Proxy method PSWS: InternalServerError:Internal server error : { "code": "InternalServerError", "message": "Internal server error", "innererror": {"message": "Internal server error", "type": "Microsoft.Exchange.Admin.OData.Core.ODataServiceException","stacktrace": "", "internalexception": { "message": "Cannot get ID from name.", "type":"Microsoft.Exchange.Data.Storage.QuotaExceededException", "stacktrace": "", "internalexception": {"message": "MapiExceptionNamedPropsQuotaExceeded: GetIdsFromNames operation has failed ...", "type":"Microsoft.Mapi.MapiExceptionNamedPropsQuotaExceeded", "stacktrace": "" } } },"adminapi.warnings@odata.type": "#Collection(String)", "@adminapi.warnings": [] }[Server=SERVERNAME,RequestId=GUID,TimeStamp=20/06/2024 15:56:34] .

Unfortunately, you cannot fix this yourself in Exchange Online and need to open a support case and get it pushed to the engineering team as fast as you can, because they need to run New-MoveRequest username -DoNotPreserveMailboxSignature to move the mailbox to a new database, and mere mortals not working for the Exchange Online team cannot run this cmdlet property on Online mailboxes.



, ,




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.