Jump to content

Data lifecycle management - Microsoft 365 Retention Policies


Recommended Posts

Posted

Hi,

 

I've finally successfully got my retention policies working for staff, they either have a 14 month or 3 year retention on emails depending on their role.

 

I cannot work out though how to export a list of which mailbox get's which policy so I can send this to our deputy head for checking to make sure we've a) not missed someone out or b) put the wrong policy against someone.

 

The root to the policies is via the Microsoft Purview portal.

 

https://compliance.microsoft.com/homepage

 

Then Data lifecycle management on the left hand side menu; Microsoft 365 then retention policies!

 

I cannot find anything online to export the mailbox list via the GUI or PowerShell.

 

Anyone any ideas?

 

Reten1.JPG

 

Clicking Edit just brings up the dialog box for selecting accounts - no option to export the list :/

Posted
Hi,

 

I've finally successfully got my retention policies working for staff, they either have a 14 month or 3 year retention on emails depending on their role.

 

I cannot work out though how to export a list of which mailbox get's which policy so I can send this to our deputy head for checking to make sure we've a) not missed someone out or b) put the wrong policy against someone.

 

The root to the policies is via the Microsoft Purview portal.

 

https://compliance.microsoft.com/homepage

 

Then Data lifecycle management on the left hand side menu; Microsoft 365 then retention policies!

 

I cannot find anything online to export the mailbox list via the GUI or PowerShell.

 

Anyone any ideas?

 

[ATTACH=CONFIG]70475[/ATTACH]

 

Clicking Edit just brings up the dialog box for selecting accounts - no option to export the list :/

 

Is this what you're looking for?

 

https://community.spiceworks.com/topic/2022402-need-to-get-a-list-of-users-and-the-email-retention-policy-assigned-to-them

Posted
Hi,

 

I've finally successfully got my retention policies working for staff, they either have a 14 month or 3 year retention on emails depending on their role.

I have to ask, how did you approach this from a cultural change and shift approach?

Many people treat their email as a file store, we need to get that culture shifted.

Posted
Sadly not.

 

This lists the retention policy that you'd get from here:

 

[ATTACH=CONFIG]70477[/ATTACH]

 

Which is different to the ones I require.

 

After spending an obscene amount of time on this I think I've managed to get it working using the attached powershell script. Just make sure to add your global admin details at the start of the script to connect to the security and compliance powershell and the exchange online powershell.

 

Do let me know if all working for you.

 

ReturnMailboxesRetentionCompliance.ps1

Posted
After spending an obscene amount of time on this I think I've managed to get it working using the attached powershell script. Just make sure to add your global admin details at the start of the script to connect to the security and compliance powershell and the exchange online powershell.

 

Do let me know if all working for you.

 

[ATTACH]70480[/ATTACH]

 

Thanks :)

 

Will give it a whirl later today and report back.

Posted
After spending an obscene amount of time on this I think I've managed to get it working using the attached powershell script. Just make sure to add your global admin details at the start of the script to connect to the security and compliance powershell and the exchange online powershell.

 

Do let me know if all working for you.

 

[ATTACH]70480[/ATTACH]

 

Well it almost works :p

 

We have two retention policies:

 

14 month retention policy (with 226 mailboxes allocated)

&

36 month retention policy (with 42 mailboxes allocated)

 

 

The script runs and the output has 2037 lines.

 

There are no lines detailing anyone having the 14 month policy

 

Everyone in the tenancy is being detailed as having the 36 month retention policy

 

:(

Posted
Well it almost works :p

 

We have two retention policies:

 

14 month retention policy (with 226 mailboxes allocated)

&

36 month retention policy (with 42 mailboxes allocated)

 

 

The script runs and the output has 2037 lines.

 

There are no lines detailing anyone having the 14 month policy

 

Everyone in the tenancy is being detailed as having the 36 month retention policy

 

:(

 

 

Is there a PowerShell command to just check one user's retention policy?

Posted
Well it almost works :p

 

We have two retention policies:

 

14 month retention policy (with 226 mailboxes allocated)

&

36 month retention policy (with 42 mailboxes allocated)

 

 

The script runs and the output has 2037 lines.

 

There are no lines detailing anyone having the 14 month policy

 

Everyone in the tenancy is being detailed as having the 36 month retention policy

 

:(

 

Shoot. Have you recently applied the policies? It can take a week for the correct policies to get to the correct mailboxes...

Posted
Shoot. Have you recently applied the policies? It can take a week for the correct policies to get to the correct mailboxes...

 

A few last week and the majority on Tuesday.

 

Just odd that even the students are being tagged against one of the policies, when they definitely aren't included!

 

Thanks for trying.

 

The policy checker might be useful.

  • 1 year later...
Posted

For anyone else wondering this works:

 

Connect-IPPSSession
 

then....

 

Get-RetentionCompliancePolicy -Identity "<POLICY NAME>" -DistributionDetail | Select-Object -ExpandProperty ExchangeLocation

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...