Home   Kaiming

Every mailbox has the default folders.

Get-ManagedFolder | ft Name,FolderName

Name   FolderName
Calendar   Calendar
Contacts   Contacts
Deleted Items   DeletedItems
Drafts   Drafts
Inbox   Inbox
Junk E-mail   JunkEmail
Journal   Journal
Notes   Notes
Outbox   Outbox
Sent Items   SentItems
Tasks   Tasks
Entire Mailbox   All
RSS Feeds   RssSubscriptions
Sync Issues   SyncIssues

1

All users must use the Outlook 2007 client.

Scenario 1: The same managed policy applies to the default folder: Junk E-mail

New-ManagedContentSettings -name '1dayretention' -messageClass * -RetentionEnabled $True -AgeLimitForRetention 1 -RetentionAction MoveToDeletedItems -FolderName 'Junk E-mail'

New-ManagedFolderMailboxPolicy -Name JunkEmailFolder -ManagedFolderLinks 'Junk E-mail'

set-mailbox -Identity 'Simon Wilson' -ManagedFolderMailboxPolicy JunkEmailFolder -ManagedFolderMailboxPolicyAllowed
set-mailbox -Identity 'Shane Williams' -ManagedFolderMailboxPolicy JunkEmailFolder -ManagedFolderMailboxPolicyAllowed
set-mailbox -Identity 'Mary Will' -ManagedFolderMailboxPolicy JunkEmailFolder -ManagedFolderMailboxPolicyAllowed
set-mailbox -Identity 'Mike Anderson' -ManagedFolderMailboxPolicy JunkEmailFolder -ManagedFolderMailboxPolicyAllowed

Start-ManagedFolderAssistant


Scenario 2: Different groups of users will have different managed policies applied to the default folder: Junk E-mail

Set-mailbox -Identity 'Mike Anderson' -ManagedFolderMailboxPolicy $NULL
Set-mailbox -Identity 'Shane Williams' -ManagedFolderMailboxPolicy $NULL
Set-mailbox -Identity 'Mary Will' -ManagedFolderMailboxPolicy $NULL
Set-mailbox -Identity 'Simon Wilson' -ManagedFolderMailboxPolicy $NULL

Remove-ManagedFolderMailboxPolicy JunkEMailFolder -confirm:$false

Remove-ManagedContentSettings 1dayretention -confirm:$false

New-ManagedFolder -Name 'Junk2day' -DefaultFolderType 'JunkEmail'
New-ManagedFolder -Name 'Junk3day' -DefaultFolderType 'JunkEmail'
New-ManagedFolder -Name 'Junk4day' -DefaultFolderType 'JunkEmail'

New-ManagedContentSettings -name '1dayretention' -messageClass * -RetentionEnabled $True -AgeLimitForRetention 1 -RetentionAction MoveToDeletedItems -FolderName 'Junk E-mail'
New-ManagedContentSettings -name '2dayretention' -messageClass * -RetentionEnabled $True -AgeLimitForRetention 2 -RetentionAction MoveToDeletedItems -FolderName 'Junk2day'
New-ManagedContentSettings -name '3dayretention' -messageClass * -RetentionEnabled $True -AgeLimitForRetention 3 -RetentionAction MoveToDeletedItems -FolderName 'Junk3day'
New-ManagedContentSettings -name '4dayretention' -messageClass * -RetentionEnabled $True -AgeLimitForRetention 4 -RetentionAction MoveToDeletedItems -FolderName 'Junk4day'

2

New-ManagedFolderMailboxPolicy -Name Junk1day -ManagedFolderLinks 'Junk E-mail'
New-ManagedFolderMailboxPolicy -Name Junk2day -ManagedFolderLinks 'Junk2day'
New-ManagedFolderMailboxPolicy -Name Junk3day -ManagedFolderLinks 'Junk3day'
New-ManagedFolderMailboxPolicy -Name Junk4day -ManagedFolderLinks 'Junk4day'

set-mailbox -Identity 'Simon Wilson' -ManagedFolderMailboxPolicy Junk1day -ManagedFolderMailboxPolicyAllowed
set-mailbox -Identity 'Shane Williams' -ManagedFolderMailboxPolicy Junk2day -ManagedFolderMailboxPolicyAllowed
set-mailbox -Identity 'Mary Will' -ManagedFolderMailboxPolicy Junk3day -ManagedFolderMailboxPolicyAllowed
set-mailbox -Identity 'Mike Anderson' -ManagedFolderMailboxPolicy Junk4day -ManagedFolderMailboxPolicyAllowed

Test: send an e-mail to all of them and move the e-mail to Junk E-mail folder

Move the clock at Exchange server to 2 days later;

Start-ManagedFolderAssistant

You will find the Junk mail for Simon Wilson and Shane Williams is moved to the Deleted Folder. But the Junk mail for Mary Will and Mike Anderson is still in place.

Move back the clock;


Scenario 3: Some users want a Pending Approval folder. The users cannot remove the folder and any messages within will be automatically moved to Deleted Folder

New-ManagedFolder -Name 'Pending Approval' -FolderName 'Pending Approval' -Comment 'All proposals must put in this folder'
New-ManagedContentSettings -Name '20dayretention' -messageClass * -RetentionEnabled $True -AgeLimitForRetention 20 -RetentionAction MoveToDeletedItems -FolderName 'Pending Approval'
new-ManagedFolderMailboxPolicy -Name 'JunkAndPending' -ManagedFolderLinks 'Junk E-mail','Pending Approval'

Mary Will has the Junk E-mail folder associated with 1dayretention Content Setting and Pending Approval folder associated with 20dayretention Content Setting.

set-mailbox -Identity 'Mary Will' -ManagedFolderMailboxPolicy JunkAndPending -ManagedFolderMailboxPolicyAllowed

New-ManagedFolder -Name 'Critical Documentation' -FolderName 'Critical Documentation' -Comment 'All critical documents must put in this folder'
New-ManagedContentSettings -Name '120dayretention' -messageClass * -RetentionEnabled $True -AgeLimitForRetention 120 -RetentionAction MoveToDeletedItems -FolderName 'Critical Documentation'
new-ManagedFolderMailboxPolicy -Name 'JunkAndCritical' -ManagedFolderLinks 'Junk2Day','Critical Documentation'

Shane Williams has the Junk E-mail folder associated with 2dayretention Content Setting and Critical Documentation folder associated with 120dayretention Content Setting.

set-mailbox -Identity 'Shane Williams' -ManagedFolderMailboxPolicy JunkAndCritical -ManagedFolderMailboxPolicyAllowed

Start-ManagedFolderAssistant

3

4

5

6