none
Creating a rule to move email from a distribution group to a custom managed folder RRS feed

  • Question

  • How  to Creat a rule to move email from a distribution group to a custom managed folder

    I tried the below

    New-InboxRule -Mailbox test -Name mRule -From test2@test.com -MoveToFolder 'Project X'

    i got the below error 

    The specified mailbox "Project X" doesn't exist.
        + CategoryInfo          : NotSpecified: (0:Int32) [New-InboxRule], ManagementObjectNotFoundExceptio
        + FullyQualifiedErrorId : 3E16A31F,Microsoft.Exchange.Management.RecipientTasks.NewInboxRule

    Please help

    Thursday, July 12, 2012 6:31 AM

All replies

  • Thursday, July 12, 2012 8:26 AM
  • thanks rajitha

    I tried to do the below

    New-InboxRule  -Name Mynewinboxrul  -Mailbox test -From test2@test.com  -MoveToFolder 'test:\Junk E-Mail' -StopProcessingRules $true

    now the problem is 

    c annot find the user from the token. Error code = 0
       + CategoryInfo          : NotSpecified: (0:Int32) [New-InboxRule], ObjectNotFoundException
       + FullyQualifiedErrorId : 8567966E,Microsoft.Exchange.Management.RecipientTasks.NewInboxRule

    Any ideas

    Thursday, July 12, 2012 9:20 AM
  • Refer the below post. Make sure the mailbox exists with the exact alias.

    http://social.technet.microsoft.com/Forums/ta/exchange2010/thread/15af804f-e4c5-4497-967f-b313df5480ed

    Thursday, July 12, 2012 9:27 AM
  • Alias are  correct , still i am getting the following error , this is happens only with movetofolder

    Thursday, July 12, 2012 12:32 PM
  • Hi supportsib,

    Can you create the rule for other mailboxes?

    If possible, please log into the mailbox to create the rule manually, then run the Get-InboxRule -Mailbox "mailbox name"| fl to view the rule. After that, delete it in OWA/Outlook and try to recreate it in Powershell again.


    Frank Wang

    TechNet Community Support

    Friday, July 13, 2012 6:57 AM
  • I can  create manually using outlook  and i could view using  Get-InboxRule -Mailbox "mailbox name"| fl  , i deleted 

    still facing same issue 

    Friday, July 13, 2012 7:46 AM
  • thanks rajitha

    I tried to do the below

    New-InboxRule  -Name Mynewinboxrul  -Mailbox test -From test2@test.com  -MoveToFolder 'test:\Junk E-Mail' -StopProcessingRules $true

    now the problem is 

    c annot find the user from the token. Error code = 0
       + CategoryInfo          : NotSpecified: (0:Int32) [New-InboxRule], ObjectNotFoundException
       + FullyQualifiedErrorId : 8567966E,Microsoft.Exchange.Management.RecipientTasks.NewInboxRule

    Any ideas


    Hi,
    To be able to create inbox rules with the cmdlet new-inboxrule you need to have fullmailboxaccess to the mailbox. Do you have that?

    Also, try this instead (Note: test:\"Junk E-Mail")
    New-InboxRule  -Name Mynewinboxrul  -Mailbox test -From test2@test.com  -MoveToFolder test:\"Junk E-Mail" -StopProcessingRules $true



    Martina Miskovic

    Friday, July 13, 2012 8:31 AM
  • Yes i have taken full permission on the  mailbox 
    Friday, July 13, 2012 9:48 AM
  • Yes i have taken full permission on the  mailbox 

    ..and you have changed the syntax?

    Martina Miskovic

    Friday, July 13, 2012 10:11 AM
  • Even the syntax did not help ( -MoveToFolder test:\"Junk E-Mail")
    Saturday, July 14, 2012 6:29 AM
  • Even the syntax did not help ( -MoveToFolder test:\"Junk E-Mail")

    So what is your error now?
    Are you sure that you have fullmailbox access to the mailbox and that the folder is called "Junk E-Mail"? Im thinking that it might be called something if the mailbox/folders is in another language.

    About creating a rule to a managed folder, you would need to specify the hole path. Something like ALIAS:\"Managed Folder\Some Folder\"

    Martina Miskovic


    Saturday, July 14, 2012 9:24 AM
  •  i created another mail enabled user and full permission on the mailboxes having manged folder  then it did work :)

    I have one more question How the storage limit is calculating on MANGED FOLDER 


    Saturday, July 14, 2012 10:37 AM
  • There's no special quota for a Managed Folders. It's part of the quota configured for the database/mailbox.


    Martina Miskovic

    Saturday, July 14, 2012 10:39 AM
  • If i want to create a rule  any email to a certain distribution group  has to be moved to a custom managed folder , how can i write  it in EMS
    Saturday, July 14, 2012 9:34 PM