Armen Minasyan
asked on
Exchange 2010 SP1 New-InboxRule issue
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], ManagementObjectNotFoundEx ception
+ FullyQualifiedErrorId : F38C5D83,Microsoft.Exchang e.Manageme nt.Recipie ntTasks.Ne wInboxRule
The specified mailbox "\eBrochure" doesn't exist.
+ CategoryInfo : NotSpecified: (0:Int32) [New-InboxRule], ManagementObjectNotFoundEx ception
+ FullyQualifiedErrorId : F38C5D83,Microsoft.Exchang e.Manageme nt.Recipie ntTasks.Ne wInboxRule
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
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], ManagementObjectNotFoundEx
+ FullyQualifiedErrorId : F38C5D83,Microsoft.Exchang
The specified mailbox "\eBrochure" doesn't exist.
+ CategoryInfo : NotSpecified: (0:Int32) [New-InboxRule], ManagementObjectNotFoundEx
+ FullyQualifiedErrorId : F38C5D83,Microsoft.Exchang
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
ASKER
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], ManagementObjectNotFoundEx ception
+ FullyQualifiedErrorId : F489F465,Microsoft.Exchang e.Manageme nt.Recipie ntTasks.Ne wInboxRule
The specified mailbox "Dieter Meyer.Alias" doesn't exist.
+ CategoryInfo : NotSpecified: (0:Int32) [New-InboxRule], ManagementObjectNotFoundEx
+ FullyQualifiedErrorId : F489F465,Microsoft.Exchang
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
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 ?
Maybe try another question ?
ASKER
OK, Thanks much for your help!!!
$mailboxes = Get-Mailbox -Server EX2KMBOX
$mailboxes | foreach { New-InboxRule -name "eBrochure" -Mailbox $_.Alias -SubjectContainsWords "eBrochure:" -MoveToFolder "$_.Alias:\eBrochure"}