Posts Tagged Exchange Server 2007

Dude, where’s my mailbox stats?

One of the most frequently used Exchange 2003 mailbox management administrative features was the mailbox size, total item count, last logon time, log off time etc. For some strange reason, this convenient feature has been left out of Exchange Server 2007. If you are reading this blog then you probably are looking for a way to get these stats back.

The Exchange 2007 power shell is power packed to deal with this drawback and you can get all the info you need (displayed just like ESM 2003) in a jiffy by running this command (you will need to substitute MailboxServer01 with your server name):

Get-MailboxStatistics -Server MailboxServer01 | Sort -Property TotalItemsize | Format-Table DisplayName, LastLoggedOnUserAccount, ItemCount, @{expression={$_.totalitemsize.value.ToMB()};label=”Size(MB)”}, LastLogonTime, LastLogoffTime | Export-CSV ExMBXInfo.csv

All this info would get written to a csv file with the filename ExMBXInfo.csv (Edit the file name in the command if you want to call it something else)

The variables used here are DisplayName, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime. There are a host of other variables that can be used to get more information. Here are some of these variables that can be used:

AssociatedItemCount
Database
DatabaseName
DeletedItemCount
DisconnectDate
DisplayName
Identity
ItemCount
LastLoggedOnUserAccount
LastLogoffTime
LastLogonTime
LegacyDN
MailboxGuid
ServerName
StorageGroupName
StorageLimitStatus
TotalDeletedItemSize
TotalItemSize

Drop me a line if this article helped you!

, , , ,

No Comments

Exchange 2007 Recreate OWA folders

If you face an issue where OWA in Exchange 2007 stops working, there is a pretty cool powershell command you can run to recreate the OWA virtual directory. The following commands will get you going:

This command will list all the current virtual directories.

Get-OwaVirtualDirectory

This command will delete the “owa” virtual directory under the Default Web Site.

Remove-OwaVirtualDirectory -identity "owa (Default Web Site)"

This command will re-create the “owa” virtual directory under the Default Web Site.

New-OWAVirtualDirectory -OWAVersion "Exchange2007" -Name "owa (Default Web Site)"

When you run this command, if you get an error as follows, it is possible that IIS is set to work in the 32 bit mode and not the required 64 bit mode.

New-OwaVirtualDirectory : An error occurred while creating the IIS virtual directory ‘IIS://mailserver.somewhere.com/W3SVC/1/ROOT/owa’ on ‘mailserver’.
At line:1 char:24
+ New-OWAVirtualDirectory  <<<< -OWAVersion "Exchange2007" -Name "owa" -Website "Default Web Site"

To make IIS work in the 64 bit mode, you need to run the following command:

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0

Just in case you do not have the adsutil.vbs script in your adminscripts folder, you can download it from here.

Drop me a line to let me know if this post has helped you!

, , ,

No Comments