Repair-ClusterSharedVolume
Repair-ClusterSharedVolume
Run repair tools on a Cluster Shared Volume locally on a cluster node.
Syntax
Repair-ClusterSharedVolume -ChkDsk [-VolumeName] <string> [-Parameters <string>] [<CommonParameters>]
ChkDsk
VolumeName
Parameters
Repair-ClusterSharedVolume -Defrag [-VolumeName] [-Parameters ] []
Defrag
VolumeName
Parameters
Detailed Description
This cmdlet runs chkdsk.exe or defrag.exe on a CSV volume. It will turn maintenance on for the volume, move the cluster resource to the node running this cmdlet, run the tool, and then turn maintenance off for the volume. This cmdlet has to run locally on one of the cluster nodes. To run remotely, use PowerShell Remoting.
Parameters
ChkDsk
Causes the cmdlet to run chkdsk.exe on the volume. Any parameters specified in -Parameters will be passed through to chkdsk.exe. Refer to "chkdsk.exe /?" for help on this tool.
Default Value: **
Data Type: SwitchParameter
Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? |
true |
required |
Variable Length? |
false |
variableLength |
Accept wildcard characters? |
false |
globbing |
Accept Pipeline Input? |
false |
pipelineInput |
Position? |
named |
position |
Value Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? |
false |
required |
Variable Length? |
false |
variableLength |
Defrag
Causes the cmdlet to run defrag.exe on the volume. Any parameters specified in -Parameters will be passed through to defrag.exe. Refer to "defrag.exe /?" for help on this tool.
Default Value: **
Data Type: SwitchParameter
Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? |
true |
required |
Variable Length? |
false |
variableLength |
Accept wildcard characters? |
false |
globbing |
Accept Pipeline Input? |
false |
pipelineInput |
Position? |
named |
position |
Value Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? |
false |
required |
Variable Length? |
false |
variableLength |
Parameters
Specifies the parameters to pass through to the tool.
Default Value: **
Data Type: string
Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? |
false |
required |
Variable Length? |
false |
variableLength |
Accept wildcard characters? |
false |
globbing |
Accept Pipeline Input? |
false |
pipelineInput |
Position? |
named |
position |
Value Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? |
true |
required |
Variable Length? |
false |
variableLength |
VolumeName
Specifies the name of the volume to run the tool on.
Default Value: **
Data Type: string
Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? |
true |
required |
Variable Length? |
false |
variableLength |
Accept wildcard characters? |
false |
globbing |
Accept Pipeline Input? |
false |
pipelineInput |
Position? |
1 |
position |
Value Attributes
Name | Value | PSMAML Attribute |
---|---|---|
Required? |
true |
required |
Variable Length? |
false |
variableLength |
Input Type
Return Type
Examples
-------------------------- EXAMPLE 1 --------------------------
Command Prompt: C:\PS>
Repair-ClusterSharedVolume C:\ClusterStorage\Volume1 -Defrag
Description
-----------
This command runs defrag.exe on Cluster Shared Volume C:\ClusterStorage\Volume1.
-------------------------- EXAMPLE 2 --------------------------
Command Prompt: C:\PS>
Repair-ClusterSharedVolume C:\ClusterStorage\Volume1 -ChkDsk -Parameters "/F"
Description
-----------
This command runs chkdsk.exe on Cluster Shared Volume C:\ClusterStorage\Volume1 and passes "/F" to the chkdsk.exe command line.
See Also
Reference
Get-ClusterSharedVolume
Resume-ClusterResource
Suspend-ClusterResource