Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

After investigating, MiniTool found that many reasons can cause DiskPart to encounter an error. When this occurs, your data might get lost from the certain disk. Therefore, this post is to offer you an effective way to recover data when this issue troubles you, as well as possible causes and solutions for such an error.

On This Page :

DiskPart Has Encountered an Error the Request Could Not Be Performed

Apart from the Windows built-in Disk Management, DiskPart is also a useful tool to manage disks and partitions reasonably and fix errors in every Windows system.

The DiskPart has more functions and magic than most third-party partitioning wizards and its functions are even more powerful. But it has an obvious disadvantage – it runs under the command prompt, which tends to cause many people to make mistakes because they are not familiar with DOS operations.

You may receive error messages like

  • DiskPart has encountered an error: The parameter is incorrect
  • DiskPart has encountered an error: Access is denied
  • DiskPart has encountered an error: I/O device error
  • DiskPart has encountered an error: Data error (Cyclic redundancy check)
  • DiskPart has encountered an error: The device is not ready
  • DiskPart has encountered an error: The system cannot find the file specified.

The error prevents you from accessing a disk, but it can be fixed easily by various methods.

Causes of DiskPart Has Encountered an Error

  • Parameter is incorrect.
  • Access is denied
  • I/O device error
  • Media is write-protected
  • Data error (cyclic redundancy check)
  • The device is not ready
  • The system cannot find the file specified

Recover from DiskPart Has Encountered an Error

Considering the fact that mistakes could be easily made during the disk error fix process (which may lead to data being overwritten), I strongly advise you to recover important data from the target drive first.

MiniTool Power Data Recovery is a reliable free data recovery software, which is compatible with all Windows systems. It works well on external hard drive data recovery, SSD data recovery, SD card data recovery, and so on. Besides, it can recover lost data under various situations like OS crash, damaged hard drive, virus attack, etc. To save your scan time, MiniTool Power Data Recovery supports specified scan locations like Desktop, Recycle Bin, and selected folder.

The free edition provides up to 1GB of file recovery. For a larger data recovery capacity, you can go to this site to find advanced editions. MiniTool Power Data Recovery provides Personal and Business editions. You can select a suitable one based on your requirements.

How to Recover Data from Disk with Error

Step 1: Download and install MiniTool Power Data Recovery by clicking the download button below.

MiniTool Power Data Recovery FreeClick to Download100%Clean & Safe

Step 2: Launch the software.

Before starting scanning, you can switch to the Scan Settings section to configure scan conditions including file systems and file types. The scan results will only show the file types you selected.

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

Step 3: Choose a partition to scan. When you receive an error massage in the process of running the software, please turn to the Devices tab and choose to scan the whole drive.

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

Step 4: Wait for the scan process to complete. The scan time is decided by the data size and drive capacity. Please be patient for the best data recovery result.

When you look through the result page, you can use the utilized functions like Filter, Type, and Search. These three functions help you locate files quickly by narrowing them down. Besides, you can also preview the files you selected before saving them.

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

Step 5: Select the wanted files and click Save.

Step 6: Choose the storage path in the pop-up window and click OK to start data recovery.

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

How to Fix DiskPart Has Encountered an Error

Here are 6 most common cases of DiskPart has encountered an error. Each of them has different causes and solutions, so you should assess the situation that resonates with yours the most and take corresponding measures to fix the error.

DiskPart Has Encountered an Error: The Parameter Is Incorrect

The error – “DiskPart has encountered an error: The parameter is incorrect.” – occurs sometimes on users’ computers. It usually occurs due to a damaged file system, bad sectors, etc. Here list two common solutions to help you fix this problem.

Solution 1: Use Error-checking Utility

Error-checking is a Windows built-in tool, which is used to check the integrity of the disk and repair errors.

Step 1: Press Win + E to open File Explorer.

Step 2: Click This PC and right-click on the problematic drive.

Step 3: Choose Properties from the context menu.

Step 4: Shift to the Tools tab.

Step 5: Click on the Check button in the Error-checking section.

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

Step 6: Click Scan and repair this drive choice.

Then wait for the process to complete.

Solution 2: Run the Command chkdsk /f /r

The CHKDSK command is used to scan and repair system errors and bad sectors. When you encounter the parameter incorrect error, try this method.

Step 1: Open the Run window by pressing Win + R.

Step 2: Type cmd into the text box and press Shift + Ctrl + Enter to run Command Prompt as administrator.

Step 3: Type chkdsk /f /r *: (you need to replace * with the drive letter of the target drive)

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

Step 4: Press Enter.

Step 5: Wait for the completion of the check process.

DiskPart Has Encountered an Error: Access Is Denied

According to the investigation, the error – “DiskPart has encountered an error: Access is denied” – tends to appear when you use the DiskPart clean or format command to clear a USB drive. It is said that this error usually caused by the write-protection. You can try the next methods to fix it.

Solution 1: Run the Command Prompt as Administrator

When you use DiskPart with Command Prompt and face this error, it is probably because you don’t run Command Prompt as administrator.

Step 1: Press Win + R to open the Run window.

Step 2: Type cmd and press Shift + Ctrl + Enter to run Command Prompt as administrator.

Step 3: Click OK in the popup User Account Control window.

Step 4: You can try DiskPart again.

Solution 2: Disable the Write-Protection

Step 1: Press Win + R to open the Run window.

Step 2: Type regedit in the text box and hit Enter.

Step 3: Navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > USBSTOR.

Step 4: Find and double-click on the Start option in the right panel.

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

Step 5: Change the Value data into 3 and click OK to save the change.

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

You can check the computer’s event logs for more information as the error message suggests if you cannot find the exact cause of the problem.

Tips:

This post gives more about the access is denied error and the corresponding solutions.

DiskPart Has Encountered an Error: I/O Device Error

This error occurs when Windows failed to perform input and output orders. Therefore, you can’t access, format, or partition hard drives. The I/O device error may be caused by damaged devices, bad sections, etc. There are some ways to fix this issue. Please keep reading.

Solution 1: Change Write-protection Key

You can refer this method to Access Is Denied: Solution 2: Disable the Write-protection.

Solution 2: Uninstall or Update Disk Drive

Step 1: Press Win + X and select Device Manager.

Step 2: Find and expand Disk Drive.

Step 3: Right-click on your external hard drive.

Step 4: Select Update drive or Uninstall device according to your needs.

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

  • If you select Update driver, choose Search automatically for drivers and finish the rest steps with the following instructions.
  • If you choose Uninstall device, click Uninstall again in the popup window. Then, replug your device to the computer. Your computer will install corresponding driver automatically.

Tips:

For more methods to solve I/O Device Error, please refer to this passage: What Is I/O Device Error & How to Fix I/O Device Error?

DiskPart Has Encountered an Error: Data Error (Cyclic Redundancy Check)

The data error cyclic redundancy check can be the result of many factors, such as registry corruption, unsuccessful program installation, cluttered hard disk and misconfigured files.

Solution 1: Check Disk

Please see Parameter Is Incorrect error. Solution 1: enable error-checking function.

Solution 2: Run SFC Scan

System File Checker (SFC) is used to fix Windows system files including registry files, system files, and so on. It can find and repair corrupted files to fix some errors.

Step 1: Press Win + R to open the Run window.

Step 2: Type cmd and press Shift + Ctrl + Enter to run Command Prompt as administrator.

Step 3: Type sfc/scannow and hit Enter.

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

Step 4: Wait for the process to complete and restart your computer.

DiskPart Has Encountered an Error: The Device Is Not Ready

This error is mainly caused by two reasons: the disk has failed; the storage controller on your mainboard is corrupted. Try the following methods to fix it.

Solution 1: Run the Hardware and Sound Troubleshooter

Step 1: Press Win + R to open the Run window.

Step 2: Type cmd in the text box and hit Enter to open Command Prompt.

Step 3: Type msdt.exe -id DeviceDiagnostic and click Enter.

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

Step 4: Click Next to start the troubleshooting process.

Solution 2: Uninstall the USB Controller

Step 1: Press Win + X and choose Device Manager from the context menu.

Step 2: Find Universal Serial Bus controllers and expand it.

Step 3: Right-click on the first USB controller and select Uninstall device.

Clean ổ usb cmd lỗi diskpart has encountered a error năm 2024

Step 4: Click Uninstall in the popup window to confirm.

Step 5: Repeat steps 3 and 4 to uninstall the rest USB controllers.

After that, please reboot your computer and retry DiskPart.

DiskPart Has Encountered an Error: The System Cannot Find the File Specified

This error appears when the USB flash drive/SD card is damaged or corrupted and its file system may have turned into RAW. You can find specific methods from the passage: How to Fix “The System Cannot Find the File Specified” Disk Error.

Verdict

It is common to run into errors while running DiskPart. This post has listed several methods to fix this error. Hope these solutions can help you solve your problem.

Besides, if you skip data recovery step and start fixing the error directly, don’t forget to check your files and recover lost data if necessary.