Answered by:
Help with Exchange 2007 Powershell

Question
-
Hi
Running Exchange 2007 SP2. Our EMEA maibox servers have named like EMEAMBX1, EMEAMBX2 etc. APAC ones are APACMBX1, APACMBX2...
I've been trying to figure out a way if it's possible to run a Powershell command that will list the sizes of the databases on EMEA servers?
And, secondly, not only list them, but list by either largest or smallest?
Does anyone know if this is possible? I ca'nt seem to figure it outSunday, March 6, 2011 7:59 PM
Answers
-
On Sun, 6 Mar 2011 19:59:05 +0000, Sheen1990 wrote:>Hi Running Exchange 2007 SP2. Our EMEA maibox servers have named like EMEAMBX1, EMEAMBX2 etc. APAC ones are APACMBX1, APACMBX2... I've been trying to figure out a way if it's possible to run a Powershell command that will list the sizes of the databases on EMEA servers? And, secondly, not only list them, but list by either largest or smallest? Does anyone know if this is possible? I ca'nt seem to figure it outYou'd get the information about the databases from theget-mailboxdatabase cmdlet (the "EdbFilePath" property). You'd get thesize of the files by substituting "\\servername\X$\" for the driveletter ("X:") and using that in the get-childitem cmdlet (the size isfound in the "length" property). Now you have the name of the server,the file's path, and its size.---Rich MatheisenMCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVPSunday, March 6, 2011 8:43 PM -
Hi,
Have a look at the below link.
http://www.powershellcommunity.org/Forums/tabid/54/aft/1110/Default.aspx
Thanks.
Nagaraj N- Marked as answer by Serena Li Monday, March 14, 2011 2:25 AM
Monday, March 7, 2011 8:42 AM
All replies
-
On Sun, 6 Mar 2011 19:59:05 +0000, Sheen1990 wrote:>Hi Running Exchange 2007 SP2. Our EMEA maibox servers have named like EMEAMBX1, EMEAMBX2 etc. APAC ones are APACMBX1, APACMBX2... I've been trying to figure out a way if it's possible to run a Powershell command that will list the sizes of the databases on EMEA servers? And, secondly, not only list them, but list by either largest or smallest? Does anyone know if this is possible? I ca'nt seem to figure it outYou'd get the information about the databases from theget-mailboxdatabase cmdlet (the "EdbFilePath" property). You'd get thesize of the files by substituting "\\servername\X$\" for the driveletter ("X:") and using that in the get-childitem cmdlet (the size isfound in the "length" property). Now you have the name of the server,the file's path, and its size.---Rich MatheisenMCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVPSunday, March 6, 2011 8:43 PM -
Hi,
Have a look at the below link.
http://www.powershellcommunity.org/Forums/tabid/54/aft/1110/Default.aspx
Thanks.
Nagaraj N- Marked as answer by Serena Li Monday, March 14, 2011 2:25 AM
Monday, March 7, 2011 8:42 AM -
Hi,
Here is an good article for you,
Exchange 2007:Database Statistics in Powershell:
http://exchangeshare.wordpress.com/2009/07/27/exchange-2007-database-statistics-in-powershell/
Best regards,
Serena
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.Wednesday, March 9, 2011 6:53 AM