Skip to main content desktop


Performs repairs on a volume.
Repair-Volume [-DriveLetter*] <Char[]> [-CimSession <CimSession[]>] [-OfflineScanAndFix] [-Scan] [-SpotFix][-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Repair-Volume [-CimSession <CimSession[]>] [-OfflineScanAndFix] [-Scan] [-SpotFix] [-ThrottleLimit <Int32>][-Confirm] [-WhatIf] [<CommonParameters>]
Repair-Volume [-CimSession <CimSession[]>] [-OfflineScanAndFix] [-Scan] [-SpotFix] [-ThrottleLimit <Int32>] -Path*<String[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Repair-Volume [-CimSession <CimSession[]>] [-OfflineScanAndFix] [-Scan] [-SpotFix] [-ThrottleLimit <Int32>]-FileSystemLabel* <String[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Repair-Volume [-CimSession <CimSession[]>] [-OfflineScanAndFix] [-Scan] [-SpotFix] [-ThrottleLimit <Int32>]-ObjectId* <String[]> [-Confirm] [-WhatIf] [<CommonParameters>]

The Repair-Volume cmdlet performs repairs on a volume. The following repair actions are available:

OfflineScanAndFix: Takes the volume offline to scan the volume and fix any errors found (equivalent to chkdsk /f).

Scan: Scans the volume without attempting to repair it; all detected corruptions are added to the $corrupt system file (equivalent to chkdsk /scan).

SpotFix: Takes the volume briefly offline and then fixes only issues that are logged in the $corrupt file (equivalent to chkdsk /spotfix).


-CimSession [<CimSession[]>]

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

-DriveLetter <Char[]>

Specifies a letter used to identify a drive or volume in the system.

-FileSystemLabel <String[]>

Specifies the volume to scan based on the file system label (the volume name).

-ObjectId <String[]>

Specifies an ID representing the object. The ID is not globally unique.

-OfflineScanAndFix [<SwitchParameter>]

Performs and offline scan and fix of any errors found in the file system.

-Path <String[]>

Contains valid path information.

-Scan [<SwitchParameter>]

Scans the volume.

-SpotFix [<SwitchParameter>]

Takes the volume offline and fixes any issues that are logged in the $corrupt file.

-ThrottleLimit [<Int32>]

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShellr calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

-Confirm [<SwitchParameter>]

  • Default value is false

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.

-WhatIf [<SwitchParameter>]

  • Default value is false

Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.


This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Volume The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.
EXAMPLE 1 PS C:\>Repair-Volume -DriveLetter H -Scan This example scans drive H and reports errors only. EXAMPLE 2 PS C:\>Repair-Volume -DriveLetter H -OfflineScanAndFix This example takes drive H offline, and fixes all issues. EXAMPLE 3 PS C:\>Repair-Volume -DriveLetter H -SpotFix This example uses the spot verifier functionality to quickly fix drive H.
    Back to PowerShell Command list
    © 2020 Corporation


    • PDQ Deploy
    • PDQ Inventory
    • PDQ Link
    • Enterprise SL
    • Pricing
    • Downloads
    • Licensing
    • Buy