PowerShell Logo Small

Repair-Volume



This is the built-in help made by Microsoft for the command 'Repair-Volume', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Performs repairs on a volume.

SYNTAX


Repair-Volume [-DriveLetter] <Char[]> [-AsJob] [-CimSession <CimSession[]>] [-OfflineScanAndFix] [-Scan] [-SpotFix] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]
Repair-Volume [-AsJob] [-CimSession <CimSession[]>] [-OfflineScanAndFix] [-Scan] [-SpotFix] [-ThrottleLimit <Int32>] -Path <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
Repair-Volume [-AsJob] [-CimSession <CimSession[]>] [-OfflineScanAndFix] [-Scan] [-SpotFix] [-ThrottleLimit <Int32>] -FileSystemLabel <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
Repair-Volume [-AsJob] [-CimSession <CimSession[]>] [-OfflineScanAndFix] [-Scan] [-SpotFix] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
Repair-Volume [-AsJob] [-CimSession <CimSession[]>] [-OfflineScanAndFix] [-Scan] [-SpotFix] [-ThrottleLimit <Int32>] -ObjectId <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


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).



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=307024
Format-Volume
Get-Volume
Optimize-Volume
Set-Volume

REMARKS

<

Examples


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.