How to check mailbox retention policy with powershell

Albert Gostick 91 Reputation points
2020-06-09T20:36:26.743+00:00

Hi,
I have configured a new retention policy in O365 and applied it to user mailboxes. I wanted to be able to use Powershell to list the retention policy for each user to make sure I did not miss any.

Not having fun with powershell - what modules would I need to install and what would the commandlet be to run to show the retention policy on each mailbox. I don't use powershell a lot and each article I look up seems to take me down a dead end.

Thanks.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,882 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 85,646 Reputation points
    2020-06-09T23:00:20.017+00:00

    Hi,

    Q&A currently supports the products listed over here https://learn.microsoft.com/en-us/answers/products (more to be added later on).

    For Exchange Online you can use the following PowerShell modules:
    https://learn.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps

    For an Exchange Server hosted in Azure, you can use the following PowerShell module:
    https://learn.microsoft.com/en-us/powershell/exchange/exchange-management-shell?view=exchange-ps

    You can also reach out to more experts in the dedicated Office 365 forum over here:
    https://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365Admin

    (Please don't forget to accept helpful replies as answer)

    Best regards,
    Leon


1 additional answer

Sort by: Most helpful
  1. Dave Patrick 426K Reputation points MVP
    2020-06-09T23:02:52.793+00:00

    Something here may help.

    https://learn.microsoft.com/en-us/powershell/module/exchange/get-retentionpolicy?view=exchange-ps

    https://learn.microsoft.com/en-us/powershell/module/exchange/get-retentioncompliancepolicy?view=exchange-ps

    --please don't forget to Accept as answer if the reply is helpful--

    --------------------------

    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.