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
Solved

Exchange 2010: copy inbox rules between mailboxes

Posted on 2011-03-08
6
2,931 Views
Last Modified: 2012-05-11
Is there a way to copy inbox rules from one mailbox to another using powershell?
I tried piping output from Get-InboxRule to New-InboxRule but it didn't work.
0
Comment
Question by:mpilarczyk
  • 3
  • 3
6 Comments
 
LVL 49

Expert Comment

by:Akhater
ID: 35072460
get-inboxrule new-inboxrule should work however it will be very tedious unless you have an idea about what you want
0
 
LVL 3

Author Comment

by:mpilarczyk
ID: 35080368
I'm just trying:
Get-InboxRule -Mailbox some_mailbox -Identity rule_id  | New-InboxRule -Mailbox other_mailbox -Name "Test"

Open in new window

And the result is:

The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
0
 
LVL 49

Accepted Solution

by:
Akhater earned 500 total points
ID: 35080530
no this will not work you will need to use variables like




$Rules = Get-InboxRule -Mailbox some_mailbox -Identity rule_id

$Rules | New-InboxRule -Mailbox other_mailbox -Name $_.Name -varx $_.varx etc....
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 3

Author Comment

by:mpilarczyk
ID: 35080922
This won't help me a lot, basically I can write whole new inbox rule at the same time :)
But thanks for answer :)
0
 
LVL 3

Author Closing Comment

by:mpilarczyk
ID: 35080949
This won't help me a lot, basically I can write whole new inbox rule at the same time :)
0
 
LVL 49

Expert Comment

by:Akhater
ID: 35081293
agreed that's why i told you it is teadious :)
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
Read this checklist to learn more about the 15 things you should never include in an email signature.
In this video we show how to create a Distribution Group 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 Recipients >>…
In this video we show how to create a mailbox database 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 Servers >> Data…

789 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