Announcement

Collapse
No announcement yet.

Get Mailbox statistics on ALL mailboxes including those hidden from GAL

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get Mailbox statistics on ALL mailboxes including those hidden from GAL

    I am using the following script to get stats on all mailboxes:
    Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(KB)";expression = {$_.TotalItemSize.Value.ToKB()}},ItemCount,LastLog onTime,LastLoggedOnUserAccount,ObjectClass,ServerN ame
    It seems that this only shows mailboxes which are visible in the GAL. Is there a switch I can add so that ALL mailboxes are shown including those hidden from the GAL? Thanks.

    Exchange 2007
    |
    +-- JDMils
    |
    +-- Regional Systems Engineer, DotNet programmer & Jack of all trades
    |

  • #2
    Re: Get Mailbox statistics on ALL mailboxes including those hidden from GAL

    Shouldn't matter whether they are visible in the GAL or not, because Exchange can still see them. How are you getting your list of mailboxes to query?

    Simon.
    --
    Simon Butler
    Exchange MVP

    Blog: http://blog.sembee.co.uk/
    More Exchange Content: http://exchange.sembee.info/
    Exchange Resources List: http://exbpa.com/
    In the UK? Hire me: http://www.sembee.co.uk/

    Sembee is a registered trademark, used here with permission.

    Comment


    • #3
      Re: Get Mailbox statistics on ALL mailboxes including those hidden from GAL

      Could it be that the script is only picking up the mailbox on THAT Exchange server and not the other Exchange server?

      We have two Exchange servers and I am running the script on one of them.

      EDIT: Yep! That was it, the script only works on the CURRENT server. The modified script runs on the specified server:
      Get-MailboxStatistics -server MyExchangeServer| Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(KB)";expression = {$_.TotalItemSize.Value.ToKB()}},ItemCount,LastLog onTime,LastLoggedOnUserAccount,ObjectClass,ServerN ame
      Thanks for the enlightenment!
      Last edited by JDMils; 18th February 2011, 03:53.
      |
      +-- JDMils
      |
      +-- Regional Systems Engineer, DotNet programmer & Jack of all trades
      |

      Comment


      • #4
        Re: Get Mailbox statistics on ALL mailboxes including those hidden from GAL

        If you prefix it with get-mailbox, then it should call all mailboxes on all servers.

        Get-Mailbox | Get-MailboxStatistics ....


        Simon.
        --
        Simon Butler
        Exchange MVP

        Blog: http://blog.sembee.co.uk/
        More Exchange Content: http://exchange.sembee.info/
        Exchange Resources List: http://exbpa.com/
        In the UK? Hire me: http://www.sembee.co.uk/

        Sembee is a registered trademark, used here with permission.

        Comment


        • #5
          Re: Get Mailbox statistics on ALL mailboxes including those hidden from GAL

          xxxxxxxxx
          xxxxxxxxx
          xxxxxxxxx
          Last edited by JDMils; 20th June 2011, 04:07.
          |
          +-- JDMils
          |
          +-- Regional Systems Engineer, DotNet programmer & Jack of all trades
          |

          Comment


          • #6
            Re: Get Mailbox statistics on ALL mailboxes including those hidden from GAL

            You have changed the scope of the question.

            The error you are getting about that one mailbox is what I would expect if it hasn't been logged in to, because Exchange only creates mailboxes on demand. An account can be mail enabled, but if it isn't used, there will be no mailbox in the database.

            How many mailboxes do you have? If you have more than 1000 then the error you are seeing is also what I would expect, because it is querying a full list of the mailboxes to begin with. It isn't referring to an error for the list of mailboxes that match your criteria, but the error is on the first part of the command - get-mailbox.

            Simon.
            --
            Simon Butler
            Exchange MVP

            Blog: http://blog.sembee.co.uk/
            More Exchange Content: http://exchange.sembee.info/
            Exchange Resources List: http://exbpa.com/
            In the UK? Hire me: http://www.sembee.co.uk/

            Sembee is a registered trademark, used here with permission.

            Comment


            • #7
              Re: Get Mailbox statistics on ALL mailboxes including those hidden from GAL

              xxxxxxxxx
              xxxxxxxxx
              xxxxxxxxx
              Last edited by JDMils; 20th June 2011, 04:08.
              |
              +-- JDMils
              |
              +-- Regional Systems Engineer, DotNet programmer & Jack of all trades
              |

              Comment

              Working...
              X