Is there an issue/recent change with the PowerShell cmdlet Export-MailboxDiagnosticLogs?

Chris Dehon 10 Reputation points
2023-09-06T10:13:37.33+00:00

When using the Export-MailboxDaignostiLogs we used to get ExtendedProperties for Exchange Online shared mailboxes - we are now getting a Microsoft.Exchange.Data.StoreObjects.StoragePermanentException exception.

Is anyone else experiencing this? Any work around?

Export-MailboxDiagnosticLogs -Identity someone@domain.com -ExtendedProperties
Write-ErrorMessage : |Microsoft.Exchange.Data.StoreObjects.StoragePermanentException|The process failed to get the
correct properties.
At C:\Users\userprofile\AppData\Local\Temp\tmpEXO_qpktaq41.1ow\tmpEXO_qpktaq41.1ow.psm1:1184 char:13
+             Write-ErrorMessage $ErrorObject
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Export-MailboxDiagnosticLogs], StoragePermanentException
    + FullyQualifiedErrorId : [Server=BE1P281MB2577,RequestId=4df7ba19-ee96-9209-020b-100ce7182dc6,TimeStamp=Wed, 06 S
   ep 2023 08:55:59 GMT],Write-ErrorMessage
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
3,711 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,321 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 42,306 Reputation points
    2023-09-06T12:29:03.8166667+00:00

    Hello there,

    You can use below the API to get the site by searching the sitename,

    https://graph.microsoft.com/v1.0/sites?search="NameofSite"

    In PowerShell use the below command,

    Get-MgSite -Search "NameofSite"

    To get server-relative URL for a site resource, you can construct a request as GET /sites/{hostname}:/{server-relative-path}, refer access-a-site-by-server-relative-url

    Similar discussion here https://learn.microsoft.com/en-us/answers/questions/1178627/get-mgsite-search-*

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–