Archive

Archive for the ‘Exchange 2007’ Category

Balance mailbox count over Databases in Exchange 2007 and 2010

July 13, 2011 Leave a comment

Quick one;

 

http://www.stevieg.org/tag/move-mailbox/

 

Has a fab little script that will generate you a PS1 script to automate the mailbox count over multiple databases.

 

It only works with count so far – but the author says they will eventually re-write it to count size distribution also.

 

Handy as hell when mass-provisioning mailboxes using, oh I don’t know, Quest tools.

Unable to close MMC – You must close all dialog boxes before you can close

June 24, 2011 4 comments

Long time no see y’all – been a bit quiet but am back with another bug from Microsoft;

When attempting to close MMC (Active Directory Users and Computers or the Exchange Management Console for example) on a Windows 2008 R2 server with Internet Explorer 9 installed you get the following error;

For the sake of our friend Google (as I’m not using my normal software to fill out the “blanks”) – thats “You must close all dialog boxes before you can close Exchange Management Console”

 

There is an interesting thread on the Technet forums that has been going some time;

http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/ea4e1ffe-472e-4508-9a14-0735ac6322ca

It looks to affect Windows 7 also – so it must be the “7” suite of OS’s (i.e Windows 6.1).

 

The “work-around” at this moment is to uninstall IE9 – which is fine on your server (and not so fine on your Desktop). Some users have reported that disabling Enhanced Security for IE is a temporary fix (along with adding http://localhost and https://localhost to the Trusted sites), though I don’t see how this would work with Windows 7.

 

Official line from MS at this moment is “Sorry, we are working on it”.

 

Funnily enough it only seems to happen when certain dialog boxes / panes are opened (see above Technet post) – so if you do get it just kil mmc.exe from the Task Manager 🙂

 

Au Revoir!

Remove Disabled mailbox

April 19, 2011 Leave a comment

Quick one – a little PowerShell to remove a user who you have Disabled.

Get-MailboxStatistics –Database DATABSE| where {$_.DisplayName -eq "Users Name"} | foreach {Remove-StoreMailbox -Database $_.Database -Identity $_.mailboxguid -MailboxState Disabled}

 

Note, this could be changed to the following;

Get-MailboxStatistics –Database DATABSE| where {$_.DisconnectedReason -eq "Disabled"} | foreach {Remove-StoreMailbox -Database $_.Database -Identity $_.mailboxguid -MailboxState Disabled}

 

Which *should* remove all Disabled mailboxes in the DATABASE specified (I haven’t tested this, only the single user one (I also only tested in 2010 – but the same premise should stick for 2007 too))

Checking Rollup version in Exchange 2010 (and Exchange 2007)

March 4, 2011 Leave a comment

Since Exchange 2007, rollup updates are not necessary show in the EMC/EMS against the server object;

image

As can be seen above, the servers are all listed as 2010 RTM even though I know I have installed RU4!!

Never mind, this can properly be seen by running the following PowerShell command;

GCM exsetup.exe | fl

And checking the “FileVersion”;

image

Happy updating!

PowerShell command to get top 10 Mailboxes sorted by Size

February 15, 2011 Leave a comment

Use the following script to get your top 10 “offenders” in terms of Mailbox size.

 

Get-Mailbox -database DB2 -ResultSize Unlimited| Get-MailboxStatistics | Sort-Object TotalItemSize -descending |Select-Object DisplayName,ItemCount,@{name="MailboxSize";exp={$_.totalitemsize}} -first 10

 

Change the database to reflect the database required, or remove “-database DB2” completely to get a result against all mailboxes.

 

Disclaimer : This has been tested against 2010, however the same command should work for 2007. If it doesn’t drop me a line and I’ll re-write.

Enable / Disable Circular Logging on all databases

February 15, 2011 3 comments

There are some cases where Circular logging can be helpful – when migrating a large amount of email in from another system for example.

Get-StorageGroup | Set-StorageGroup -CircularLoggingEnabled $true

However, remember to re-disable it when done;

Get-StorageGroup | Set-StorageGroup -CircularLoggingEnabled $false

The Information Store must be restarted for either of these changes to take place – if you have a DAG then bounce over the active copy to another server (and back if required) to do this.

As correctly pointed out be MB the above is 2007 shell not 2010 (my bad!!)

The below is 2010 shell instead;

Get-MailboxDatabase | Set-MailboxDatabase -CircularLoggingEnabled $true

Bizarrely I must have been thinking of 2010 when I wrote this as I clearly mention DAG’s

However both require an Information Store restart – failover usually achieves this just make sure to take all databases on that node over and if in doubt then restart the service 😀

Sorry guys!!!!

Static ARP on a Juniper EX4200

February 15, 2011 Leave a comment

Had a requirement from a customer to add in a static ARP address for a Exchange 2010 Cas Array (Multicast NLB) I had put in.

 

A bit (read:lot) of digging got me to the following;

 

set interfaces vlan.100 family inet address 10.1.254.254/16 arp 10.1.31.6 multicast-mac 03:bf:0a:01:1f:06</DIV< div>

 

Where vlan.100 is the vlan ID, family inet address the “Default Gateway” for that VLAN, 10.1.31.6 is the NLB address and 03:bf:0a… is the MAC address of the NLB.

 

You can find this by opening the NLB configuration tool and selecting properties on any node, and selecting “Cluster Parameters” 🙂