Exchange · Powershell · Retention policy

Audit Exchange Retention Policy

a customer needed to Check what retention policy is applied on which user

by default the Get-mailbox query the First 1000 item, so we need to use the -ResultSize Unlimited

In addition, the customer has the Exchange server on a parent domain and the users on a child domain, so if you don’t specify the Domain controller to use the get-mailbox will query against the parent domain domain controllers. so we need to use the -DomainController DC01.child.parent

So, the used Powershell cmdlet would be:

Get-Mailbox -DomainController DC01.child.parent -ResultSize Unlimited | select DisplayName,UserPrincipalName,RetentionPolicy | Export-CSV UserRetentionPolicy.csv

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s