Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 692
  • Last Modified:

how to create a managed folder mailbox policy using exchange management shell

I must journal my emails to a third party.  Apparently the vendor does not yet have complete instructions on how to perform Push journaling for Exchange 2010 SP 1 - as I understand, some processes that used to be done thru the Exchange Management console must now be done with Exchange Management Shell.  So I am on my own for this!

Part of the process is this:  I have to create a policy to delete forwarded messages from the journaling mailbox.  The first step is to create a managed content setting for the Deleted items folder.  What I have created is below, and it is failing for this reason: No managed folder named 'Deleted Items' was found in the Active Directory.  Make sure the folder name is spelled correctly. (more detail, may not be relevant...)

New-ManagedContentSettings -Name "Erado Archive Content Setting" -FolderName "Deleted Items" -MessageClass * -RetentionEnabled $true -RetentionAction DeleteAndAllowRecovery -AgelimitForRetention 07.00:00:00 -TriggerForRetention WhenDelivered

Where am I going wrong?
0
lita-pie
Asked:
lita-pie
  • 5
  • 4
1 Solution
 
AkhaterCommented:
your command is perfectly correct I tested and and it is working

run Get-ManagedFolder what is the output ? do you have deleted items ?
0
 
lita-pieAuthor Commented:
Output is nothing - maybe I have missed a step?  Do I need to specify a folder before entering my command?
0
 
AkhaterCommented:
no they should be created by default, anyway run this first

New-ManagedFolder -Name 'Deleted Items' -DefaultFolderType DeletedItems

and then your command it should fix it for you
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
lita-pieAuthor Commented:
Did that, and it responded with Name Name-Deleted Items, FolderName DeletedItems, and Description ManagedDefaultFolder, so it was input successfully.

But my command still fails with the same error...I even changed where I had double quotes to single quotes and same error.

?
0
 
AkhaterCommented:
what is the outcome of  Get-ManagedFolder ?
0
 
lita-pieAuthor Commented:
see screenshot please.  I must be away from computer for a while, will check back later today,  Thanks so much.
EMS-Error.jpg
0
 
NenadicCommented:
Try to change the original formula to:

New-ManagedContentSettings -Name "Erado Archive Content Setting" -FolderName DeletedItems" -MessageClass * -RetentionEnabled $true -RetentionAction DeleteAndAllowRecovery -AgelimitForRetention 07.00:00:00 -TriggerForRetention WhenDelivered
0
 
AkhaterCommented:
well for some reason you created it under the name "name-deleted item" and not deleted items  ! (check the screenshot)

try to run the below as is please

Get-ManagedFolder | Remove-ManagedFolder -confirm:$false

New-ManagedFolder -Name "Deleted Items" -DefaultFolderType DeletedItems


New-ManagedContentSettings -Name "Erado Archive Content Setting" -FolderName "Deleted Items" -MessageClass * -RetentionEnabled $true -RetentionAction DeleteAndAllowRecovery -AgelimitForRetention 07.00:00:00 -TriggerForRetention WhenDelivered
0
 
lita-pieAuthor Commented:
Yes, I see where I created it wrong - left out the space.

Thank you!!! That did it!  I was able to finish the task by following your lead.

Exchange Management Shell is scary for first time users like me!
0
 
AkhaterCommented:
Great to know it is working now
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now