locked
Exchange PowerShell RRS feed

  • Question

  • Hello,

    I am running in Exchange 2007:

    [PS] C:\Documents and Settings\dominiqued>Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | where {$_.StorageLimitStatus -notlike "BelowLimit*"} | select DisplayName,LegacyDN,DatabaseName,StorageLimitStatus|Export-Csv c:\ExceedQuota.csv

    but the display is great as showing a full error message:

    WARNING: Object ad/SSS/FFFFFFF/Uuuuuu\Mmmmmmmm  has been corrupted and it is in an inconsistent state. The
    following validation errors have occurred:
    WARNING: The Name property contains leading or trailing whitespace, which must
    be removed.
    WARNING: Object ad/SSS/Aaaaaay/Users/xxx, Yyyy has
    been corrupted and it is in an inconsistent state. The following validation
    errors have occurred:

    but the csv result file is showing IssueWarning, Send Prohibited and no comment... what is the field which will have the full information as per the display?

    I tried:

    [PS] C:\Documents and Settings\dominiqued>Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | where {$_.StorageLimitStatus -notlike "BelowLimit*"} | select DisplayName,LegacyDN,DatabaseName,StorageLimitStatus,ErrorAction,ErrorVariable,WarningAction,WarningVariable|Export-Csv c:\ExceedQuota.csv

    but did not get uch with ErrorVariable,WarningAction,WarningVariable...

    I would like:

    1. list all mailboxes with this issues

    2. How to correct them

    Thanks,
    Dom


    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager





    • Edited by Felyjos Tuesday, March 5, 2013 12:45 AM
    Tuesday, March 5, 2013 12:08 AM

Answers

  • Hi,

    I would recommend to use two special cmdlets at the beginning and starting point of the script.

    include 'start-transcript' at the beginning of the script

    This will write the entire operations done durring the cmdlet operation to a text file.

    Include 'stop-transcript' as the end line of the script.

    The text file location should be displayed in the EMC window. Examine the text file to see the steps processed on which mailbox

    -verbose is also useful to use along with the cmdlet


    Regards from ExchangeOnline Windows Administrator's Area

    Tuesday, March 5, 2013 5:31 AM