locked
Help with Exchange 2007 Powershell RRS feed

  • 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 out
    Sunday, 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 out
     
    You'd get the information about the databases from the
    get-mailboxdatabase cmdlet (the "EdbFilePath" property). You'd get the
    size of the files by substituting "\\servername\X$\" for the drive
    letter ("X:") and using that in the get-childitem cmdlet (the size is
    found in the "length" property). Now you have the name of the server,
    the file's path, and its size.
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    • Proposed as answer by Serena Li Wednesday, March 9, 2011 6:51 AM
    • Marked as answer by Serena Li Monday, March 14, 2011 2:26 AM
    Sunday, 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 out
     
    You'd get the information about the databases from the
    get-mailboxdatabase cmdlet (the "EdbFilePath" property). You'd get the
    size of the files by substituting "\\servername\X$\" for the drive
    letter ("X:") and using that in the get-childitem cmdlet (the size is
    found in the "length" property). Now you have the name of the server,
    the file's path, and its size.
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    • Proposed as answer by Serena Li Wednesday, March 9, 2011 6:51 AM
    • Marked as answer by Serena Li Monday, March 14, 2011 2:26 AM
    Sunday, 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