Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exchange 2007 - Find User forwarding to specific address

Status
Not open for further replies.

Ubentobox

Technical User
Apr 22, 2011
24
US
Hey everyone,

I am trying to track down a user who is forwarding email to a general mailbox of another company. The failure to send error mails are bouncing back to anyone sending a mail to this user, however I have been unable to identify who specifically is doing this. The server runs just under a thousand users.

I have tried the following command, but it seems to return both true and false statements on forwarding and halts after 6 user returns. I am working with limited resources on the server (3/4 memory used) so I am hesitant to set the memory to unlimited for the search..

Code:
Get-Mailbox | Where {$_.ForwardingAddress -ne $null} | Select Name, ForwardingAddress, DeliverToMailboxAndForward

 
Don't be afraid to run the command with unlimited results. Doing "get-mailbox" on 1000 users isn't going to break anything, and 75% memory utilization isn't that significant on an Exchange server that has more than 8gb of RAM installed. Just go for it.

You should expect both true and false results, because some of the mailboxes that are set to forward are also set to deliver locally as well, which is what the true/false governs. Every mailbox returned by the search has forwarding enabled though, so maybe there are only 6 people with forwarding enabled in your company? Or maybe there are only six among the first 100 users queried, since you didn't use the "-resultsize unlimited" parameter.

Dave Shackelford
ThirdTier.net
TrainSignal.com
 
Instead of looking for $_.forwardingaddress -ne $null, change your search parameter to look for anyone forwarding to the email address in question use -like (instead of -eq) "*joe.schmoe*". The * is a wildcard and will cause the command to return all mailboxes forwarding to an address that contains 'joe.schmoe'.

When all else fails, read the book!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top