?
Solved

Exchange 2010 SP1 New-InboxRule issue

Posted on 2011-03-11
6
Medium Priority
?
2,766 Views
Last Modified: 2012-05-11
Hi guys,

Migrated to Exchange 2010 and need to create new Outlook Server-Side rule to move the tagged messages into Subfolder.

Successfully created rule to implement for individual users:

New-InboxRule "eBrochure" -Mailbox "AVM" -SubjectContainsWords "eBrochure:" -MoveToFolder "AVM:\eBrochure"

But when I'm trying to apply it to all users on the server I'm getting error. Here is the code:


$mailboxes = Get-Mailbox -Server EX2KMBOX
$mailboxes | foreach { New-InboxRule "eBrochure" -Mailbox $_.Name -SubjectContainsWords "eBrochure:" -MoveToFolder "\eBrochure"}


Error is:

The specified mailbox "\eBrochure" doesn't exist.
    + CategoryInfo          : NotSpecified: (0:Int32) [New-InboxRule], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : F38C5D83,Microsoft.Exchange.Management.RecipientTasks.NewInboxRule

The specified mailbox "\eBrochure" doesn't exist.
    + CategoryInfo          : NotSpecified: (0:Int32) [New-InboxRule], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : F38C5D83,Microsoft.Exchange.Management.RecipientTasks.NewInboxRule


Please advise what is wrong in my code.

Also, I craeted a custom managed folder in Exchange 2010. How to make it visible in user's Outlook's set of folders?

Thank you in advance!

Armen
0
Comment
Question by:Armen Minasyan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 49

Expert Comment

by:Akhater
ID: 35110656
please try this

$mailboxes = Get-Mailbox -Server EX2KMBOX
$mailboxes | foreach { New-InboxRule -name "eBrochure" -Mailbox $_.Alias -SubjectContainsWords "eBrochure:" -MoveToFolder "$_.Alias:\eBrochure"}
0
 

Author Comment

by:Armen Minasyan
ID: 35110718
Just tried this. More promising but still getting multiple error on every box:

The specified mailbox "Dieter Meyer.Alias" doesn't exist.
    + CategoryInfo          : NotSpecified: (0:Int32) [New-InboxRule], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : F489F465,Microsoft.Exchange.Management.RecipientTasks.NewInboxRule
0
 
LVL 49

Accepted Solution

by:
Akhater earned 2000 total points
ID: 35110760
oki now this

$mailboxes = Get-Mailbox -Server EX2KMBOX
$mailboxes | foreach { New-InboxRule -name "eBrochure" -Mailbox $($_.Alias) -SubjectContainsWords "eBrochure:" -MoveToFolder "$($_.Alias):\eBrochure"}
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

Author Comment

by:Armen Minasyan
ID: 35110817
Akhater!

Thanks much!!!! PERFECT!!!! I'm getting errors only on the mailboxes which don't have the folders on their mailboxes. So, question is to how to create subfolders first? Is it something you can do?

Here what I tried:

$mailboxes = Get-Mailbox -Server EX2KMBOX
$mailboxes | foreach { New-ManagedFolder -name $($_.Alias) -FolderName "$($_.Alias):\eBrochure" -StorageQuota '50Mb' -Comment 'Messages in this folder are retained for 2 Weeks' -MustDisplayComment $true }


But it is creating a lot of Managed folders such DMR\Ebrochures
0
 
LVL 49

Expert Comment

by:Akhater
ID: 35110891
managed folders are not per user it should be enough to create one managed folder. I am afraid I am not very familiar with managed folders so I won't be able to help on this one sorry...

Maybe try another question ?
0
 

Author Comment

by:Armen Minasyan
ID: 35110899
OK, Thanks much for your help!!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
Suggested Courses
Course of the Month12 days, 4 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question