This powershell script will apply a Mailbox Retention Policy to a Active Directory Security Group Members
This script require Quest ActiveRoles Management Shell for Active Directory, available for FREE at http://www.quest.com/powershell/
To add the ActiveRoles Management Shell snap-in from Windows PowerShell
At the Windows PowerShell prompt, enter the following command:
Add-PSSnapin Quest.ActiveRoles.ADManagement
This is the script:
Get-QADGroupMember 'Exchange Retention Exception' | ForEach-Object {set-Mailbox $_.Name -ManagedFolderMailboxPolicy "Managed-Folders-60-Days"}
No comments:
Post a Comment