--------------------------------------------------------------------------------------------------------------+ Exchange 2007 notes from work, just incase they help someone else. --------------------------------------------------------------------------------------------------------------+ Error: [PS] C:\>Get-MailboxStatistics -Database "(DATABASE)" Get-MailboxStatistics : The specified mailbox database "(DATABASE)" is not unique. At line:1 char:22 + Get-MailboxStatistics <<<< -Database "(DATABASE)" Cause: Mounted 'Recovery Storage Group' has the same name as the live database. (SERVER)\(STORAGEGROUP)\(DATABASE) (SERVER)\Recovery Storage Group\(DATABASE) Solution: Use the full path to the database. Get-MailboxStatistics -Database "(SERVER)\(STORAGEGROUP)\(DATABASE)" Get-MailboxStatistics -Database "(SERVER)\Recovery Storage Group\(DATABASE)" --------------------------------------------------------------------------------------------------------------+ Simple example of running an inline Exchange PowerShell command from VBScript or VB6. Set oShell = CreateObject("Wscript.Shell") oShell.Run ("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin; get-mailbox -ResultSize Unlimited | out-file c:\output.txt") --------------------------------------------------------------------------------------------------------------+