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.

Community Center | Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 86,031 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. Anonymous
    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.