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.
I noticed the other day that the Quest imported DL’s are a tad messy – lots of “userid.postoffice.domain” references.
Wrote the following to clean it up – should work without too much butchering into your own environment (but test first!)
$list=get-distributiongroup -ResultSize Unlimited
set-distributiongroup -Identity $line.DisplayName -EmailAddressPolicyEnabled $false
Some handy PowerShell cmdlets to parse out nastily long Quest NDS Migrator logs
Select-String finalerror.txt -Pattern " Error " | select Line | Format-Table -Wrap | Out-File errors.txt
Select-String finalerror.txt -Pattern "(The process cannot access the file because it is being used by another process)" | select Line | Format-Table -Wrap | Out-File err-inuse.txt
Select-String finalerror.txt -Pattern "(Invalid path, or path too long.)" | select Line | Format-Table -Wrap | Out-File err-toolong.txt
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 😀