Setting an inbox rule for a mailbox using PowerShell
May 21, 2009 3 Comments
I was talking to a US East Coast Higher Education institution yesterday that is currently in the process of rolling out Outlook Live. They intend doing a hard switch over of the service behind the existing student email addresses, and one thing they also wanted to retain were redirection rules that the students had set up… they have all of the details for this on a per-address level. This objective can be achieved through PowerShell scripting… what follows are the component commands to use.
In Outlook Live, inbox rules are set on a per-mailbox basis… and this is something that users would normally configure manually through Outlook 2007 or OWA. An administrator can however grant themselves with access to a mailbox, and then proceed to set up rules on the end-user’s behalf. In this example, I am using JennyA as the mailbox to configure, and Admin as the mailbox admin. JennyA is redirecting her mail to her personal Hotmail account.
First of all, as an admin, you need to grant yourself full access rights to the mailbox:
add-MailboxPermission -Identity jennya -User admin -AccessRights fullaccess
Then add the new inbox rule to
new-inboxrule -name "Redirect to personal hotmail" -mailbox jennya -redirectto jennya@hotmail.com
You will see something like this:
Finally, remove the admin’s access rights
remove-MailboxPermission -Identity jennya -User admin -AccessRights fullaccess
So that is it…enjoy!
Jonny

Is there a setting to have a maximum password length? We are running into this error when trying to reset a passwordPassword for member:"user@domain.net" is invalid. Please try with a password of a different length.
There is no setting you can configure to set the maximum password length… here are the guidelines we set: http://help.outlook.com/en-us/140/cc540536.aspx
We have 1 user who cannot connect from Outlook 2007. Everyone else seems to be able to connect fine with the client. What settings should I check in PowerShell?