Description
PROBLEM
When "chkdsk /f" is invoked on volumes in use, the user is told, "Cannot lock current drive. Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (y/n)." The docuemntation for Repair-Volume says, "OfflineScanAndFix: Takes the volume offline to scan the volume and fix any errors found (equivalent to chkdsk /f)," but does not specify how a reboot is handled. For example, will the Repair-Volume cmdlet reboot the machine right then and there? Or will it run on next reboot, whenever that is? If the latter, it does not say this. Rather it just outputs "NoErrorsFound." That is, it neither fails with an exception (that could be caught, interpreted, and handled), nor does it prompt how the user wishes to handle the s ituation.
SOLUTION
The documentation for Repair-Volume needs to at least specify how a reboot is handled when a volume is locked. That is, is the endpoint rebooted right then and there, or is the action just scheduled the next time the endpoint reboots.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: b6dc697b-ee07-31ec-90f1-9ce1fefe7f34
- Version Independent ID: e691576d-fcfb-2200-775b-504da087c6f8
- Content: Repair-Volume (Storage)
- Content Source: docset/winserver2012-ps/storage/Repair-Volume.md
- Product: w10
- Technology: windows
- GitHub Login: @JasonGerend
- Microsoft Alias: jgerend