locked
Mailbox-database result size limited to 1000 RRS feed

  • Question

  • All,

    I use the following snippet to generate a list of mailboxes and mailbox count on each issue i am having is the result size is limited to 1000

    Get-MailboxDatabase -Server $Target -Status | Select Server, Mounted, @{n='MailboxeCount';e={@(Get-Mailbox -database $_.identity).count}}, LastFullBackup, StorageGroup, Name, @{Name="Size";Expression={$objitem = (Get-MailboxDatabase $_.Identity); $path = "`\`\" + $objitem.server + "`\" + $objItem.EdbFilePath.DriveName.Remove(1).ToString() + "$"+ $objItem.EdbFilePath.PathName.Remove(0,2); $size = ((Get-ChildItem $path).length)/1048576KB; [math]::round($size, 2)}} | Sort-Object Name


    i've tried using -resultsize:unlimited unfortunately with no luck
    Wednesday, February 17, 2010 2:01 AM

Answers


  • You want the -resultsize unlimited on your get-mailbox, not your get-mailboxdatabase.


    Get-MailboxDatabase -Server $Target -Status | Select Server, Mounted, @{n='MailboxeCount';e={@(Get-Mailbox -database $_.identity -resultsize unlimited).count}}, LastFullBackup, StorageGroup, Name, @{Name="Size";Expression={$objitem = (Get-MailboxDatabase $_.Identity ); $path = "`\`\" + $objitem.server + "`\" + $objItem.EdbFilePath.DriveName.Remove(1).ToString() + "$"+ $objItem.EdbFilePath.PathName.Remove(0,2); $size = ((Get-ChildItem $path).length)/1048576KB; [math]::round($size, 2)}} | Sort-Object Name
    • Proposed as answer by Marco Shaw Wednesday, February 17, 2010 2:21 AM
    • Marked as answer by Marco Shaw Wednesday, February 17, 2010 1:06 PM
    Wednesday, February 17, 2010 2:20 AM

All replies

  • Lose the colon.  -resultsize unlimited

    Wednesday, February 17, 2010 2:06 AM
  • No matter where it's placed get the same thing

    Get-MailboxDatabase : A parameter cannot be found that matches parameter name 'resultsize'.
    At line:1 char:58
    + Get-MailboxDatabase -Server vaunsw137 -Status -resultsize  <<<< unlimited| Select Server, Mounted, @{n='MailboxeCount';e={@(Get-Mailbox -datab
    ase $_.identity).count}}, LastFullBackup, StorageGroup, Name, @{Name="Size";Expression={$objitem = (Get-MailboxDatabase $_.Identity); $path = "`
    \`\" + $objitem.server + "`\" + $objItem.EdbFilePath.DriveName.Remove(1).ToString() + "$"+ $objItem.EdbFilePath.PathName.Remove(0,2); $size = ((
    Get-ChildItem $path).length)/1048576KB; [math]::round($size, 2)}} | Sort-Object Name



    Thanks for the help mate :-)








    Wednesday, February 17, 2010 2:12 AM
  • Consider posting HERE in the Exchange admin forum.
    Wednesday, February 17, 2010 2:20 AM

  • You want the -resultsize unlimited on your get-mailbox, not your get-mailboxdatabase.


    Get-MailboxDatabase -Server $Target -Status | Select Server, Mounted, @{n='MailboxeCount';e={@(Get-Mailbox -database $_.identity -resultsize unlimited).count}}, LastFullBackup, StorageGroup, Name, @{Name="Size";Expression={$objitem = (Get-MailboxDatabase $_.Identity ); $path = "`\`\" + $objitem.server + "`\" + $objItem.EdbFilePath.DriveName.Remove(1).ToString() + "$"+ $objItem.EdbFilePath.PathName.Remove(0,2); $size = ((Get-ChildItem $path).length)/1048576KB; [math]::round($size, 2)}} | Sort-Object Name
    • Proposed as answer by Marco Shaw Wednesday, February 17, 2010 2:21 AM
    • Marked as answer by Marco Shaw Wednesday, February 17, 2010 1:06 PM
    Wednesday, February 17, 2010 2:20 AM
  • mjolinor your a god works perfectly.

    Wednesday, February 17, 2010 2:37 AM