Author Archives: Garen

Checking Exchange Server 2007,2010 User Mailbox Sizes

If you are like me and you like to keep track of your users’ mailbox sizes
Here are two very important PowerShell commands, which I find very useful

Both of those two commands will list the following
Display Name, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime

This command will sort the results by “Mailbox Size” Descending
Get-MailboxStatistics -database “MAILBOXDATABASE_NAME” | Sort-Object TotalItemSize -Descending | Select DisplayName, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime | Format-Table

This command will sort the results by “LastLogon Time” Descending
Get-MailboxStatistics -database ” MAILBOXDATABASE_NAME ” | Sort-Object LastLogonTime -Descending | Select DisplayName, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime | Format-Table

For the complete list of parameters and options for the command Get-MailboxStatistics
Click here http://technet.microsoft.com/en-us/library/bb124612(v=exchg.141).aspx

Disclaimer.
The information in this article is provided “AS IS” with no warranties, and confers no rights. 

Microsoft Exchange 2010 DAG Witness server not working

A while back I was having some issues with my Exchange 2010 DAG (Database Availability Groups)
When it was originally configured and tested, everything worked fine. At one point the DAG witness server was moved to a domain controller through the EMC (Exchange Management Console)
Sadly it did not display any errors or warnings, things were not working well after the move.
There were no errors or warning in the event viewer to suggest any issues either.
When one Exchange server was shutdown, all outlook clients would get disconnected
It did not matter which exchange server was shutdown

After going back and forth on this issue, I realized that the witness server’s DAG folder file’s modified date had not change, from the time the DAG witness server was moved

So I move it again to a new server using PowerShell and that fixed the issue
The DAG now functions and if any one server is shutdown the other one takes over and so on.

Here is what you need to do or check if you are having this same issue

– On the DAG witness server, make sure to place the user “Exchange Trusted Subsystem” as a Local Admin.
– Now open PowerShell and run
– Set-DatabaseAvailabilityGroup DAGNAME -WitnessServer WITNESSSERVERNAME -WitnessDirectory C:\DAGFOLDERLOCATION
– DAG path will be created automatically; you will be prompted if there were any errors or warning.

For a full list about the command (Set-DatabaseAvailabilityGroup)
Go here http://technet.microsoft.com/en-us/library/dd297934.aspx

Disclaimer.
The information in this article is provided “AS IS” with no warranties, and confers no rights.