Apply Retention Policy to All New Mailboxes

I have created a retention policy tag to “Delete and Allow Recovery” after 14 days of all items in the “Deleted Items” folder.
I then created a Retention Policy to apply the tag. I see using the EMS I can run a command “Get-Mailbox | Set-Mailbox –RetentionPolicy “Empty Trash” to apply to all existing mailboxes but how do I apply this to all new mailboxes as
well?
I see a posting at
http://www.proexchange.be/blogs/exchange2010/archive/2011/08/31/using-the-scripting-agent-to-automate-some-basic-housekeeping-tasks.aspx
that describes using the Scripting Agent to automate this processes but it seems overkill for my simple requirement. If I go this route does this need to be applied to each Exchange Server? Is this the only way or is there a simpler way to apply a recipient
policy to all existing and future mailboxes?
Pacerfan9

Hi,
Any updates on this issue?
If anything is unclear, please feel free to let us know. 
Thanks,
Evan Liu
TechNet Subscriber Support
in forum
If you have any feedback on our support, please contact
[email protected]  
Evan Liu
TechNet Community Support

Similar Messages

  • Script set to auto apply Retention policy to all new mailbox created and run everyday

      Script to set auto apply Retention policy to all new mailbox created and run everyday on Exchange 2007 , 2010 , and 2013.
     Could you please help me with the script will rename the policy name please help me with script..
     Thanks,
     Chandu

    Hi Chandu,
    Have you find the solution finally? Have you tried Pavan's suggestion?
    Sorry for my lacking of code and script. If your requirement still haven't been achieved, I suggest we can ask a question in Exchange Development forum and Script Center for more professional suggestion:
    Microsoft Exchange Development forum
    http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads
    Script Center
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    Regards,
    Winnie Liang
    TechNet Community Support

  • Applying retention Policy tags to inbox in Exchange Server 2010

    I configured a Journal inbox in Exchange server 2010. I would like to configure a retention policy of 30 days so after a month all emails will be deleted from the Inbox of the Journal account. I configured the retention policy but messages
    would never get deleted.

    Hi,
    Based on the description, you created a retention policy tag, the type was Inbox, added this tag to a retention policy and then applied this policy to the journal mailbox. However, this retention policy didn't work.
    For this issue, first, I recommend you check if this tag is disabled. Besides, please check the application log to see if the Managed Folder Assistant has processed this journal mailbox. You can force the Managed Folder Assistant to apply the policy manually
    by running the Start-ManagedFolderAssistant command.
    If you have checked the above, I suggest you change the Action that retention policy tag performs to check the result.
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Apply password policy to all users

    Hi,
    I have been poking around with setting up a password policy on Sun DS 6.3.1. Everything works ok but I only have seen examples of how to apply the password policy to a single user, with an ldif something like:
    dn: uid=pepe,ou=People,dc=mycompany,dc=com
    changetype: modify
    replace: pwdPolicySubentry
    passwordPolicySubentry:
    cn=MyPolicy,dc=mycompany,dc=com
    but I haven't figured out how to apply it to all users or to a group of users. What I would like to do is to apply the policy to all users under ou=People,dc=mycompany,dc=com.
    Any tips ?
    Thanks in advance.

    For all users, simply modify the global password policy.
    For specific group of users, create a password policy and a Class of Service which links the users to the policy. Just search the directory server docs on how to do that in details.

  • Powershell script to apply retention policy by group

    I am working on a script to apply a specific retention policy to individuals who are members of a particular group, another for rooms, and yet another to everyone else.  Below is what I'm working with:
    I run into an error that states "Pipeline not executed because a pipeline is already executing..." and the retention policy doesn't get set.  can someone tell me where I've gone wrong here?  Or perhaps an easier solution?
    #Check entire domain
    Set-ADServerSettings -ViewEntireForest $true
    #Active Directory Group
    $Group = [ADSI]("LDAP://CN=EXCHANGE_DISABLE_PURGE,OU=EXCHANGE ACCOUNTS,DC=domain,dc=com")
    #Enum Group Members and set equal to array
    $Grouplist = $Group.member
    #do loop varaible setup
    $GroupLength=$Grouplist.count
    $GroupArrayLength=$GroupLength - 1
    $GroupCount = 0
    $Userlist= @(0..$GroupArrayLength)
    $UsersDN=@(0..$GroupArrayLength)
    #do loop to disable purge policy for all array members
    do {
     $Userlist[$GroupCount] = [ADSI]("LDAP://" + $Grouplist[$GroupCount])
     $UsersDN[$GroupCount] = $userlist[$GroupCount].distinguishedname
     $GroupLength=$GroupLength - 1
     $GroupCount++
    until ($GroupLength -eq 0)
    Get-mailbox -database db01 -resultsize Unlimited | foreach-object{
     if ([string[]]$UsersDN -contains $_.DistinguishedName){
      if ($_.RetentionPolicy -ne "NoPurge"){
       set-mailbox $_ -RetentionPolicy NoPurge
       write-host("Applied - No Purge Policy to "+$_.DisplayName) -ForeGroundColor Green
     elseif (($_.RecipientTypeDetails -eq "RoomMailBox") -or ($_.RecipientTypeDetails -eq "EquipmentMailbox")){
      if ($_.RetentionPolicy -ne "Default Resource/Equipment Policy"){
       set-mailbox -identity $_ -RetentionPolicy "Default Resource/Equipment Policy"
       write-host("Applied - Default Resource/Equipment Policy to "+$_.DisplayName) -ForeGroundColor Green
     else{
      if ($_.RetentionPolicy -ne "180DayDefault"){
       set-mailbox -identity $_ -RetentionPolicy "180DayDefault"
       write-host("Applied - Default 180 Day Purge Policy to "+$_.DisplayName) -ForeGroundColor Green

    Hi,
    In order to resolve this issue more efficiently, I recommend you post to the Script forum which is staffed by more experts specializing in this kind of problems. You might get a better answer there. Thanks for understanding.
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?category=scripting
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Powershell script to apply retention policy by group - Exchange 2010

    I am working on a script to apply a specific retention policy to individuals who are members of a particular group, another for rooms, and yet another to everyone else.  Below is what I'm working with:
    I run into an error that states "Pipeline not executed because a pipeline is already executing..." and the retention policy doesn't get set.  can someone tell me where I've gone wrong here?  Or perhaps an easier solution?
    #Check entire domain
    Set-ADServerSettings -ViewEntireForest $true
    #Active Directory Group
    $Group = [ADSI]("LDAP://CN=EXCHANGE_DISABLE_PURGE,OU=EXCHANGE ACCOUNTS,DC=domain,dc=com")
    #Enum Group Members and set equal to array
    $Grouplist = $Group.member
    #do loop varaible setup
    $GroupLength=$Grouplist.count
    $GroupArrayLength=$GroupLength - 1
    $GroupCount = 0
    $Userlist= @(0..$GroupArrayLength)
    $UsersDN=@(0..$GroupArrayLength)
    #do loop to disable purge policy for all array members
    do {
    $Userlist[$GroupCount] = [ADSI]("LDAP://" + $Grouplist[$GroupCount])
    $UsersDN[$GroupCount] = $userlist[$GroupCount].distinguishedname
    $GroupLength=$GroupLength - 1
    $GroupCount++
    until ($GroupLength -eq 0)
    Get-mailbox -database db01 -resultsize Unlimited | foreach-object{
    if ([string[]]$UsersDN -contains $_.DistinguishedName){
      if ($_.RetentionPolicy -ne "NoPurge"){
       set-mailbox $_ -RetentionPolicy NoPurge
       write-host("Applied - No Purge Policy to "+$_.DisplayName) -ForeGroundColor Green
    elseif (($_.RecipientTypeDetails -eq "RoomMailBox") -or ($_.RecipientTypeDetails -eq "EquipmentMailbox")){
      if ($_.RetentionPolicy -ne "Default Resource/Equipment Policy"){
       set-mailbox -identity $_ -RetentionPolicy "Default Resource/Equipment Policy"
       write-host("Applied - Default Resource/Equipment Policy to "+$_.DisplayName) -ForeGroundColor Green
    else{
      if ($_.RetentionPolicy -ne "180DayDefault"){
       set-mailbox -identity $_ -RetentionPolicy "180DayDefault"
       write-host("Applied - Default 180 Day Purge Policy to "+$_.DisplayName) -ForeGroundColor Green

    Hi,
    I generally get all mailboxes first and then use a foreach loop to process each one. This usually seems to fix the error about concurrent pipelines.
    $mbxs = Get-Mailbox
    foreach ($mbx in $mbxs) {
    # Do stuff here on each mailbox
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • Query For Retention Policy On All Folders

    I am looking for a way to query for the retention policy assigned to all user folders (per folder/per user). My client allows the user to set the folder retention policy per folder and would like to know how each user has that configured. This is for
    a 700 user environment. I know any CSV generated as output could have thousands of rows.
    thanks.
     

    You will have to use EWS for that. Here's an example (for 2013):
    $getRTResp=$exchangeService.GetUserRetentionPolicyTags()
    function GetTagName($tagGUID) {
    if (!$tagGUID) { return ($getRTResp.RetentionPolicyTags | ? {$_.Type -eq "All"}).DisplayName }
    foreach ($tag in $getRTResp.RetentionPolicyTags) {
    if ($tag.RetentionId -eq $tagGUID) { return $tag.DisplayName }
    $FpageSize =100
    $FOffset = 0
    $folderView = new-object Microsoft.Exchange.WebServices.Data.FolderView($FpageSize,$FOffset,[Microsoft.Exchange.WebServices.Data.OffsetBasePoint]::Beginning)
    $folderView.Traversal = [Microsoft.Exchange.WebServices.Data.FolderTraversal]::Deep
    $folderView.PropertySet = new-object Microsoft.Exchange.WebServices.Data.PropertySet(
    [Microsoft.Exchange.WebServices.Data.BasePropertySet]::IdOnly,
    [Microsoft.Exchange.WebServices.Data.FolderSchema]::DisplayName,
    [Microsoft.Exchange.WebServices.Data.FolderSchema]::ArchiveTag,
    [Microsoft.Exchange.WebServices.Data.FolderSchema]::PolicyTag,
    [Microsoft.Exchange.WebServices.Data.FolderSchema]::FolderClass);
    $oFindFolders = $exchangeService.FindFolders([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::MsgFolderRoot,$null,$folderView)
    foreach ($folder in $oFindFolders.Folders) {
    Write-host $folder.DisplayName "has Policy:" $(GetTagName $folder.ArchiveTag.RetentionId)
    Obviously, it needs some work, a loop for all 700 users, proper error handling, etc. But hopefully it illustrates the idea. For older versions, its a bit more work to get the Name of the tag, but you can also use Get-RetentionPolicyTag for that.
    Code adapted from:
    http://blogs.msdn.com/b/akashb/archive/2012/01/12/stamping-retention-policy-tag-on-items-using-ews-managed-api-1-1-from-powershell-exchange-2010-part-2.aspx
    http://blogs.msdn.com/b/mvpawardprogram/archive/2013/04/08/5-lesser-known-operations-in-exchange-web-services-on-exchange-2013.aspx

  • Retention Policy - Archive All folders to archive-maibox (including inbox and send items)

    Hello,
    with exchange 2010 we have a retention policy to archive all mail older than 2 years to the archive-maiblox using the retention policy.
    The policy is having the setting "all other folders", so this isn`t working for the folder "inbox" "send items" etc.
    What can i change to have ALL folders moved to the archive-mailbox?
    Thx

    Hi,
    Did you means that you select "All other folders in the mailbox" as a tag type? Is right?
    If so, it will not work for the default folders (such as Inbox and Send Items..).
    Please refer to the following thread:
    Exchange 2010: Retention Policy Tag
    Type- All other folders in the mailbox
    Thanks.
    Niko Cheng
    TechNet Community Support

  • Retention Policy problems

    Hello,
    i am trying to set up the automated archival of Exchange 2013.
    So that e-mails, which are older than e.g. 1 year are get moved to the archive.
    What i did:
    1.  Create a archive database
    2.  Create a archive mailbox
    3.  Create a retention tag
    4.  Create a retention policy
    4.1 Including a Default tag and a personal tag
    5. Linked it to a user: Set-mailbox “administrator” -RetentionPolicy "Movetoarchivpolicy"
    6. Checked the User: Get-Mailbox “administrator” | Select RetentionPolicy
    7. Started the ManagedFolderAssistant: Start-ManagedFolderAssistant -Identity “administrator”
    8. But all Mails stayed in the Mailbox
    9. I tryed to manually assign a retention tag to a Mail, but I dont have the button. (OWA and Outlook 2013 ProPlus).
    Have anyone an idea, why i don't have the "assign policy" button?
    And why all Mails stay in the Mailbox?
    Thanks,

    Hi,
    Event 9018 means that Mailbox Assistant has processed the mailbox successfully. But retention policy still didn't work.
    I recommend you create a new test mailbox and apply retention policy to this new mailbox to check if it works.
    And please increase diagnostic logging level for MRM, and then monitor application log to check if there is any related events.
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • C an you display set retention policy?

    Is there a way for a Outlook client to display the current applied retention policy for all items in a folder? I know it is displayed on each item, and I looked for a column to add but didn't see anything applicable.
    This is a request from staff that have large mailboxes that are just starting to use MRM.
    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.

    Hi,
    DPTs apply to untagged mailbox items in the entire mailbox. Untagged items are mailbox items that don't already have a retention tag applied, either by inheritance from the folder in which they're located or by the user.
    There is no way to list all items that have the DPT policy applied either.
    Best regards,
    Belinda Ma
    TechNet Community Support

  • Finding mailboxes with no retention policy applied and apply a policy?

    We manually apply retention policies at the time accounts are created.  However, some get missed and therefore, I assume that means they have no retention policy at all.  So, there is no true "default" policy that is automatically applied
    when you do not manually choose one?
    How can we find the ones that were missed and apply a retention policy to those?

    Hi
    This will return all the mailboxes without any policy set:
    Get-Mailbox -Filter 'retentionpolicy -eq $null'
    So you could do this:
    Get-Mailbox -Filter 'retentionpolicy -eq $null' | Set-Mailbox -RetentionPolicy <name of your policy>
    Steve

  • How to force retention policy in Office365 for a mailbox

    Looking to run the MRM retention policy for a E3 mailbox and or Tenant.   I have an old PST file (2011 and older) that I have attached to their active Office365 mailbox Inbox Subfolder and have a policy in MRM to send the online Archive.  
    I know the MRM policy works because it has placed items in the "Online Archive" for the inbox and it's sub folders.
    The questions is how often does this MRM policy run on it's own?   Daily, hourly, weekly.
    How do I force the policy to take effect immediately?
    This is what I believe will do this via powershell:
    Set-executionpolicy remotesigned -force
    Set-executionpolicy unrestricted -force
    $LiveCred = Get-Credential
    Connect-msolservice -credential $LiveCred
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUrl
    https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection Import-PSSession $Session
      Set-Mailbox “mailbox name” -RetentionPolicy “Archive Policy”
     Start-ManagedFolderAssistant -Identity “mailbox name”

    Hi,
    In Exchange 2013, the Managed Folder Assistant is a throttle-based assistant.
    Throttle-based assistants are always running and don't need to be scheduled. The system resources they can consume are throttled. You can configure the Managed Folder Assistant to process all mailboxes on a Mailbox server within a certain period (known as
    a work cycle).
    You can use the following command to check work cycle.
    Get-MailboxServer –Identity ExServer | Format-List *WorkCycle*
    If you want to force the policy to take effect immediately, you can use the Start-ManagedFolderAssistant cmdlet.
    Here is an article for your reference, this article also applies to Exchange online.
    http://technet.microsoft.com/en-GB/library/dd297955(v=exchg.150).aspx
    Best regards,
    <o:p></o:p>
    Belinda Ma
    TechNet Community Support

  • Retention Policy between Mailbox and Archive Mailbox level

    Dear All
    I have some questions about the Retention Policy between Mailbox and Archive Mailbox.
    I want to apply different retention tag on different Mailbox level. 
    In normal case , I would like apply the Retention Policy for Mailbox after 28 days moving to archive Mailbox and over 365 days to be deleted.
    And the Archive Mailbox should be liked deleted the mail over 90 or 180 days.
    But I found that the archive Mailbox is applied the same Retention Policy as the Mailbox one.
    Is it Normal case ? How can I set another retention Policy for My archive Mailbox ?
    Best Regards
    Vincent Chi

    You cannot have a different retention policy for primary and archive mailbox. The policy applied to the primary mailbox also applies
    to the archive mailbox.
    http://blogs.technet.com/b/vikass_blog/archive/2013/07/04/retention-policy-on-archive-mailbox.aspx
    Regards
    John

  • Apply retention tag to folder automatically

    We are planning to migrate some mailboxes from Exchange 2007, which uses MRM 1.0, to Exchange 2010, which uses MRM 2.0 (Retention Tags and Policies).
    Currently, with Exchange 2007/MRM 1.0 (Managed Folders), there is a "Retained Messages" folder that contains messages users want to keep.
    Messages in this folder will *not* be deleted after 18 months (expiration date for messages *elsewhere* in the mailbox).
    Good news is that even if we uncheck the Managed Folder Mailbox policy (in the mailbox properties), the "Retained Messages" folder remains (apparently as long as there are messages inside) and this "Retained Messages" folder
    does migrate with the rest of the mailbox in test migrations to Exchange 2010.
    The next part is the tricky part...
    We intend to apply a Retention Policy to the migrated mailbox that currently has only one tag "Never Delete" (this is one of the built-in tags).
    Before applying a default retention tag to the migrated mailboxes, we want to ensure that the "Never Delete" tag is applied to the migrated "Retained Messages" folder.
    Of course, we could ask users to apply this tag and once it is applied, we could add a default tag to the policy that would delete messages after they attain a certain age (180 days, 18 months, whatever).
    Is there a way we could apply this tag automatically, and avoid deletion of old messages, in case users forget to apply the "Never Delete" tag?
    I saw this discussion...
    https://social.technet.microsoft.com/Forums/exchange/en-US/97657e0c-c7f1-4c8e-bd7f-c7ecc9760e9c/push-a-folder-to-all-clients-apply-retention-tag-to-the-folder?forum=exchangesvrgenerallegacy
    but am wondering if anything has developed since.
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

    Hi David,
    According to your description, my understanding is that you want to make sure “Never Delete” tag is applied to all “Retained Message” folder in all mailbox. Then when the mailbox is applied with other Default Policy tag, this “Retained Message” folder would
    not be effected. Is it right?
    Please confirm if the “Never Delete” tag is a personal tag created in Exchange 2010. Based on my knowledge, if it is a personal tag, the user can apply it in Outlook or OWA client instead of server side.
    Additionally, there is a blog indicates that we can using Exchange Web Services to Apply a Personal Tag to a Custom Folder. I am not sure whether it works. Just hope it would be helpful for you:
    http://blogs.technet.com/b/exchange/archive/2013/05/20/using-exchange-web-services-to-apply-a-personal-tag-to-a-custom-folder.aspx
    Migrate from Managed Folders
    http://technet.microsoft.com/en-us/library/dd298032(v=exchg.141).aspx
    Regards,
    Winnie Liang
    TechNet Community Support

  • Enforcing Retention Policy

    I have been asked by the head of the organization to enforce a 30 day retention policy for ALL emails in everyone's Outlook (Exchange 2010) - Inbox, Sent, Deleted, etc. (he deletes EVERY message as soon as he read it).    So I went into the EMC
    and following posted instructions, set and applied the policy.    Only NO emails are ever deleted in anyone's Outlook (except of course his, since he continues to manually delete everything).
    Need some help in figuring out WHY the policy is not working.   Thanks.
    Bill

    I guess I'm just going to have to start the process all over from the beginning - and hope it "takes" this time.  Yes, I did create the tags, etc with 30 days age limit and completely delete when reached - users were told to copy
    anything they wanted to keep to offline archive folders which are backed up.    Thanks - I'm just going to start from the top and see what happens.
    Well, it's months later - this wasn't a priority - and I did go back and following all the documentation, created the tags with 30 day delete for Inbox, Sent, Deleted, Junk; set a policy, included the addresses of all users; double checked that it was applied
    to all users.     And now, 3 days later, there is still email over 30 day old (WAY over for some - as much as 7 years!) still in their Inbox, Sent, Deleted; Junk.
    Now the only issue I can see that possibly makes this not work is a "warning" that says "Personal Tags are a premium
    feature. Mailboxes with policies that contain these tags (or as a result of users adding the tags to their mailbox) require an Exchange Enterprise Client Access License."
    But I'm not using the built in "Personal Tags," I created my own.  I'm not trying to set a policy on Personal Folders,
    just the Inbox, Sent, etc (and any subfolders they might have). Do I need "Enterprise CALs" to make these retention policies work?    I thought such CALs were just paper licenses, nothing to install (this is a 2010 Standard Exchange Service)
    and every where I search on line there's nothing about installing CALs in Exchange, it just says they are "paper" in case of an audit.
    Yet in Exchange it says I'm missing both Standard and Enterprise CALs.
    All too too confusing to accomplish what should be a relatively straightforward task - deleting messages after a set period of
    time.
    Any help appreciated.
    Bill

Maybe you are looking for

  • Urgent - How to Run Applet without JRE installation

    I am creating an applet which displays information using JTree. This applet needs to be deployed in 'n' systems which may or may not contain JRE. Is there any way where in i can deploy in all the systems without any error.

  • Dreamweaver CS3- Can't activate after reformat of hard drive

    Hello I had to reformat my hard drive due to a virus and made note of all my serial numbers. I put Dreamweaver CS3 back on laptop with disc and it accepts my code but then I have to phone to activate it fully. I then get a message on  the phone telli

  • Fast repair time??

    I sent my computer in last night to applecare to get a problem with a gap between the display and bottom of the computer fixed. I checked the status of the repair a few minutes ago and my macbook repair is already in progress. Thats seems pretty fast

  • How to disable geotagging on 4s

    Settings...general...doesn't appear to have a way to disable geotagging (on 4S).  I want to disable geotagging on my photos.

  • jsp: include cannot relate to css

    I created a jsp file (navigator.jsp) which uses css and it worked alright. I tried to include navigator.jsp in another jsp file namely layout.jsp.....The code of layout.jsp looks some thing like this <body> <jsp:include page="navigator.jsp" flush="tr