Solved

Exchange 2010 SP1 New-InboxRule issue

Posted on 2011-03-11
6
2,657 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:aramagedon
[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:aramagedon
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 500 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:aramagedon
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:aramagedon
ID: 35110899
OK, Thanks much for your help!!!
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Microsoft Outlook 2016/365 1 37
Skype for Business server 6 47
Exchange 2013 - Recieve Connectors 4 25
Launch Outlook minimized 6 31
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
how to add IIS SMTP to handle application/Scanner relays into office 365.

726 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