none
[Powershell] Repair-Volume cmdlet return values RRS feed

  • Question

  • Currently looking to monitor and threshold on the output from repair-volume cmdlet.

    If you run the following powershell code you will see there are 13 different status that can be returned from the cmdlet.

    0..13| % {            
    '{0} - {1}'-f $_,            
    [Microsoft.PowerShell.Cmdletization.GeneratedTypes.Volume.RepairStatus]$_            
    }
    
    0 - NoErrorsFound
    1 - ErrorsFixed
    2 - MinorErrorsFixedOrCleanup
    3 - Failed
    4 - ScanNoErrorsFound
    5 - ScanErrorsFoundAndFixedOnline
    6 - ScanErrorsFixedOnlineAlsoNeedSpotFix
    7 - ScanErrorsFoundNeedSpotFix
    8 - ScanNeedsRetry
    9 - ScanRunning
    10 - ScanTransientSnapshotError
    11 - ScanFatalSnapshotError
    12 - ScanNeedsMetaDataRetry
    13 - NeedOfflineScanAndFix


    Most of these return statuses are obvious to work out, apart from (9) ScanRunning.

    I've tried looking high and low for documentation which would detail what each status means but can't find it. If you run the command and it completes why in the world would the scan still be running that doesn't make any sense to me.

    Is anyone able to help explain this please? Any help would be greatly appreciated.

    Regards,

    Ashley.

    Friday, September 13, 2019 9:35 PM