Archive for Database Management

Exchange 2007 Hosted Exchange Project

This script was part of a test project I was involved with back in 2009 setting up a hosted exchange environment.  The project was scrapped by the people paying the bills before it ever went live, partly because 2010 was about to come out, partly because they finally started to believe me about how much it was going to cost to do it right.  Either way these are the hosted client setup scripts that I built for creating new hosting clients as well as creating new users for those clients. Read more

Bulk Public Folder Rename and Cleanup Script

While doing a migration to Exchange 2010 a few years ago I ran into a situation where lots of the public folders would not replicate from 2007 due to the inclusion of characters in the name that exchange doesn’t like, but outlook allows, including (and most difficult to troubleshoot) a trailing space in the name.

unfortunately this client had over 15,000 individual public folders they had created over years of time with data they couldn’t loose, with folder names including shipment dates (and the “/” that went along with it) and many other things. Read more

Mailbox Database White Space

Exchange uses its own database engine, and as such there are times that whitespace or space that has been freed by deleted mailboxes, emails, and other clean up functions, builds up.   Exchange by default does not compress its database, or remove the whitespace.  The whitespace is eventually used by new data, so the mailbox database size does not grow until it has to because it has used the whitespace.  There are a lot of times that I have found that I wanted to know which databases have the most whitespace so I know where to create new users to avoid expanding databases.

You can use the following command to display the Free space in each of the databases.  Powershell will give you this data in a field called AvailableNewMailboxSpace

Get-MailboxDatabase -Status | Sort-Object DatabaseSize -Descending | Format-Table Name, DatabaseSize, AvailableNewMailboxSpace

The -Status switch gets details usually not returned by the Get-MailboxDatabase command and then we only display the Name, DatabaseSize, and AvailableNewMailboxSpace.