8

We are using Live@edu, which is essentially hosted exchange server with some additional features and limitations to work around, and I'm trying to find everybody that is forwarding or redirecting emails from their accounts.

I am trying to remove old accounts that have not been used, but we have instructions for users on redirecting emails, so we should expect that some users are indeed redirecting their emails, which will make their last login/logoff times not reflect whether they are indeed using auto forwarding or auto redirecting rules.

How could I find a list of users with forwarding or redirection rules using Exchange 2010 Powershell Cmdlets?

/EDIT: It may be sufficient for my purposes to find whether there are ANY server side rules, regardless of whether the rule forwards/redirects or does some other action.

3 Answers 3

8

You mean like

get-mailbox -Filter { ForwardingAddress -like '*' } | select-object Name,ForwardingAddress

? Or rather "Inbox rules" which your users would have created in Outlook or OWA? The latter should be trickier, but piping

$mbox = Get-Mailbox; $mbox | Foreach { Get-InboxRule -Mailbox $_ }

(Ryan, thanks for testing and correcting the syntax here) and doing some filtering on non-forwarding/redirecting rules should do the trick.

0
5

I found the following PowerShell commands helpful.

To find Forward Rules:

 foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.ForwardTo} | fl MailboxOwnerID,Name,ForwardTo >> d:\Forward_Rule.txt }

To find Redirect Rules:

 foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.ReDirectTo} | fl MailboxOwnerID,Name,RedirectTo >> d:\Redirect_Rule.txt }

Source: Microsoft TechNet Forums

3

Thanks for these commands.

Here's what I ended up using to find rules that wholesale forward or redirect...

foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.RedirectTo -or $_.ForwardTo -and -not ($_.description -match "If the message") } | fl MailboxOwnerId,Description >> rules.txt }

That's to find accounts that are basically using the mailbox as a relay to send everything to a different account. I thought it might be helpful to some.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .