Archive for Brian Higgins

List all Disconnected Mailboxes with timestamp

I came across a situation where someone was messing around in AD and had accidentally deleted an account, Realizing their mistake they re-created with the same password it thinking it would just re-connect to the mailbox and the user would be fine.  By the time they called me they had deleted and re-created the account a number of times.  I had to identify the correct mailbox to reconnect to the user account, out of 4-5 versions all with the same exact name.

This command shows all disconnected mailboxes as well as the date the corresponding user account was deleted, and leaving the mailbox disconnected. The timestamp allowed me to connect the correct mailbox to the account without having to guess at anything.

get-mailboxserver | get-mailboxstatistics | where { $_.DisconnectDate } | fl DisplayName, DisconnectDate

Enable Exchange 2013 Spam Filtering

MX Logic or Postini:

If you use MX Logic, Postini, or a similar spam filtering service, you want to make sure you white list the IP ranges the service uses to submit email to your server.

Set-TransportConfig -InternalSMTPServers @{Add="",""}

These IP ranges are for MX Logic.

Enable RBL Checking and Sender ID Config:

If you are not using a 3rd party filtering service it is a good idea to enable RBL checking, and delete spoofed email as determined by SenderID.

Add-IPBlockListProvider -name -lookupdomain
Add-IPBlockListProvider -name -lookupdomain
Set-SenderIDConfig -SpoofedDomainAction Delete

Exchange 2013 Messsage Tracking “Console”

Exchange 2013 lacks the traditional Exchange Management Console that you are probably familiar with, and with it went the message tracking console that many administrators relied on to troubleshoot mail flow problems.  Sure there is now the Delivery Reports tool in the web Exchange Control Panel, but it’s just not quite the same, especially since it limits you to searching within a specific mailbox.

ECP Mail Flow

Luckily there is something similar to the Message Tracking Center in Powershell. Read more

Refresh Disconnected Mailboxes

If you ever need to force a refresh of the disconnected mailboxes on Exchange, the following command will do this for all mailbox databases.

Get-Mailboxdatabase | Clean-MailboxDatabase

I recently had to do this because one of my clients recently created a mailbox for a new employee, but didn’t realize until a few days later they had misspelled the employee’s last name, but not before they had generated a bit of internal email for the new hire.   Since so many things like logon scripts and folder redirections rely on the username, I could have fixed the display name, but would have had to leave the username unchanged and mis-spelled or risk breaking other things that I just didn’t want to deal with.  I directed the client to delete the old account and create a new one, but not create a mailbox this time.  After forcing the refresh I was able to easily reconnect the mailbox to the new correctly spelled user account, without the user loosing any data from their mailbox, or the need to export it to a PST and re-import it.