Subfolders in Deleted Items are not processed using the Deleted Items Policy
This is by design to prevent any unintentional deletion.
WARNING: Running the following scriptwill apply the deleted items policy to all subfolders of the deleted items folder in any/all mailboxes. Please make sure that you intend to do this otherwise you will need to restore the messages from backup.
1.Identify the MESSAGEPOLICYID of your delete policy, you can do this using this first query:
select * from messagepolicy
2. Add the messagepolicyid of your deleted items policy into the query below, replacing [MESSAGEPOLICYID] (also remove the[ ] brackets) which will apply it to all subfolders of the deleted items folder in any mailboxes.
update folder set messagepolicyid = [MESSAGEPOLICYID] where parentfolderid IN (select folderid from folder where name = deleted items)
Here is an example:
update folder set messagepolicyid = 8 where parentfolderid IN (select folderid from folder where name = deleted items)
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center