locked
Exchange 2007 - Create Inbox rules via Powershell RRS feed

  • Question

  • Is there a way either via Exchange Powershell or Windows Powershell to create inbox rules for different mailboxes?

    Basically I want to pass it different variables, such as what mailbox to create the rule in?  Who the mail should be forwarded to? etc.

    Friday, June 21, 2013 8:55 PM

Answers

  • That link will not work for me because they are using Exchange 2007, not Exchange 2010

    That's why I pointed you to the Redemption software. It's that or using EWS. I don't think the EWS Managed API will be much help so you'd probably have to get right down to the SOAP stuff.

    This may still work, though: RULE.DLL


    --- Rich Matheisen MCSE&I, Exchange MVP

    Friday, June 28, 2013 1:23 AM

All replies

  • Is there a way either via Exchange Powershell or Windows Powershell to create inbox rules for different mailboxes?

    Basically I want to pass it different variables, such as what mailbox to create the rule in?  Who the mail should be forwarded to? etc.

    You can use Redemption to do this.

    The first place I usually look for this sort of stuff is http://gsexdev.blogspot.com/


    --- Rich Matheisen MCSE&I, Exchange MVP

    Sunday, June 23, 2013 4:56 PM
  • I found this:

    Start-Vacation.ps1

    Function Start-Vacation
    {
     Param($user,$start, $stop, $contact)
     $oof = New-Object psobject
     $oof | Add-Member -MemberType noteProperty -Name userName -Value $user
     $oof | Add-Member -MemberType noteProperty -Name startdate -Value $start
     $oof | Add-Member -MemberType noteProperty -Name enddate -Value $stop
     $oof | Add-Member -MemberType noteProperty -Name ScriptCenterContact -Value $contact
     $oof | Add-Member -MemberType noteProperty -Name Email -Value $false
     $oof | Add-Member -MemberType noteProperty -Name Phone -Value $false
     $oof | Add-Member -MemberType noteProperty -Name FaceBook -Value $false
     $oof | Add-Member -MemberType noteProperty -Name Twitter -Value $false
     $oof
    } #end function Start-Vacation

    # *** start script ***

    $oof = Start-vacation -user "EdWilson" -start "12/5/2009" -stop "12/15/2009" `
         -contact "CraigLiebendorfer"
    "Microsoft Scripting Guy Ed Wilson is on vacation ..."
    $oof

    ---------------------------------------------------------------------

    What I am trying to figure out is which part of this is should be in the actual Start-Vacation.ps1 file and then what would the command line look like

    Thursday, June 27, 2013 2:19 PM
  • Its explained in detail over here... http://technet.microsoft.com/en-us/library/dd335170%28v=exchg.141%29.aspx

    Thanks,

    Sivaram

    Thursday, June 27, 2013 3:06 PM
  • That link will not work for me because they are using Exchange 2007, not Exchange 2010
    Thursday, June 27, 2013 3:23 PM
  • That link will not work for me because they are using Exchange 2007, not Exchange 2010

    That's why I pointed you to the Redemption software. It's that or using EWS. I don't think the EWS Managed API will be much help so you'd probably have to get right down to the SOAP stuff.

    This may still work, though: RULE.DLL


    --- Rich Matheisen MCSE&I, Exchange MVP

    Friday, June 28, 2013 1:23 AM