After investigating, I 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.
Apart from the Windows built-in Disk Management, DiskPart is also a useful tool you can rely on to manage disks & 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.
Besides, when there’s something wrong with the disk, DiskPart will strike. For instance, DiskPart has encountered an error is a frequently seen alert message. The results of the survey show that this error can be caused by a lot of reasons, such as:
- Parameter is incorrect.
- Access is denied
- I/O device error
- Media is write-protected
- Data error (cyclic redundancy check)
- The system cannot find the file specified
- The device is not ready
Here, in the following content of this article, I will show you how to recover useful data from the problematic disk with MiniTool Power Data Recovery – a professional data recovery program favored by plenty of computer users. Then, I will introduce and analyze the main causes for said hard disk error and give corresponding solutions.
Problem – DiskPart Has Encountered an Error
I will summarize 6 cases related to DiskPart has encountered an error problem in the next section. You can find the case that is similar to your situation and try to find solutions correspondingly. But in this section, I will first show you how to recover data from the defective disk.
How to Recover Data from Disk with Error
The first step is definitely to get a suitable license of MiniTool Power Data Recovery.
Of course, you can download the trial edition to experience in advance; but keep in mind that the trial edition can only scan the disk and preview files, but it cannot save the scanned data for you.
The second step is to install and run the software, and then select the most suitable option from the left side of the main interface shown below (take the trial edition as an example).
When running into the problem: DiskPart has encountered an error, you’ll receive an error message. It suggests that your disk is inaccessible, but it does exist. So at this time, you should select the Hard Disk Drive, which is used for deep scanning and recovering data from damaged, RAW or formatted drive.
The third step is to select the drive you’d like to recover data from and click on the Scan button in the lower right corner to search for the lost files.
In the lower right corner of above interface, there is also a Settings button next to the Scan button. It actually allows you to configure the scanning range to only specified file systems or file types. This will help you locate the needed files easily and quickly from the scan results in the next step.
The fourth and final step is to pick out the needed files found by the data recovery software and click on the Save button to specify a storage path for them.
Please add check marks to the square box in front of the File Name column (you can choose to check all files in a found drive or check only some of the files included in it).
If there are too many files displayed in the scanning results, it could be difficult finding certain files. However, you can make things easier by using the Find function and Filter function that help you locate the needed files accurately by file name, file extension, file size, file creation date and modification date.
If you need to recover data lost by DiskPart clean, but have no experience, the software recommended in this page will be your great assistant.
Till now, I have shown you all the steps to recover data from an inaccessible drive; please follow the steps above carefully when DiskPart encounters an error.
Causes & Solutions – DiskPart Has Encountered an Error
The following 6 symptoms are the 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 measures correspondingly to fix the error.
Case 1 – Parameter Is Incorrect
I have a hard drive that after attempting to dual boot ended up useless. I finally got some files off it and was ready to wipe it and start over. Windows 10 wouldn't install so I deleted everything, formatted entire drive, created new primary partition-still nothing. Using command prompts I cleaned the drive, created a new primary partition and tried to format it. After saying it was 100% completed, it said, “DiskPart has encountered an error: The parameter is incorrect.” I've tried clean all command for a more thorough job and gotten the same error. Hard drive test says it's good. Does anyone have any ideas? Thanks in advance for any help.– said by Superman1148 on Computing.net Forum
The error – “DiskPart has encountered an error: The parameter is incorrect.” – occurs sometimes and here are the 2 most popular causes of this problem:
- The file system of the target partition is corrupted.
- The full volume encryption driver is changed in Windows.
What if you want to recover data from the volume does not contain a recognized file system error? Please read this:
When you meet 'the volume does not contain a recognized file system' problem, you should resort to MiniTool Power Data Recovery.
How to fix the error? (The following steps are completed in Windows 10)
Solution 1: enable error-checking function.
- Open Windows Explorer to locate the target drive (how to fix when Windows Explorer needs to be restarted).
- Right click on the drive.
- Choose Properties from the context menu.
- Shift to the Tools tab.
- Find Error checking and click on the Check button.
- Choose to scan the drive.
- The disk check process will be started and finished automatically.
Solution 2: run the command chkdsk /f /r.
- Type cmd into the search box on taskbar (how to fix when Windows 10 taskbar is not working).
- Right click on Command Prompt from the search result.
- Choose Run as administrator.
- Choose Yes in the User Account Control window.
- Type chkdsk /f /r *: (“*” stands for the letter of the target drive).
- Press Enter on the keyboard.
- Wait for the completion of the check process.
You can also use other methods to open cmd.exe.
Case 2 – Access Is Denied
Hello everyone! I've been trying to format a 32GB flash drive. I'm using DiskPart to format it but still have no success. I've been trying and trying, but I always encounter the same error. “DiskPart has encountered an error: Access is denied. See the System Event Log for more information”. I tried different commands to format it, but I still arrive at the same error. I am the admin, so I don't think that's the problem. Help me please! Thank you and have a nice day!– posted by laufing on Windows Seven Forums
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. Those operations will not complete due to the interruption of this error.
How to fix this issue?
Solution 1: run the Command Prompt as administrator.
- Click on the Start button.
- Scroll down to find Windows Systems folder and expand it.
- Right click on the Command Prompt option.
- Choose More from the right-click menu.
- Select Run as administrator from the submenu.
Solution 2: remove the Write-Protection.
- Type run into the search box on taskbar.
- Choose Run from the search result.
- Type regedit into the text box.
- Press Enter on the keyboard or click on the OK button in the Run window to open Registry Editor.
- Expand Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR.
- Double click on the Start option from the right panel.
- Enter 3 in the dialog box.
- Click on the OK button to confirm.
- Close the Registry Editor.
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.
Case 3 – I/O Device Error
Hi everyone, I am trying to make a partition using command prompt. I need to partition the disks to be formatted in NTFS so I can install Windows 7 on my laptop. I've been doing this before and having no problem with my other laptops. It's my first time to encounter a problem. I'm on the step where I'll be creating a partition using cmd line. But it gives me an error message saying “DiskPart has encountered an error: The request could not be performed because of an I/O device error.” I hope someone could help me figure this out. Thanks in advance!– said by reynl07 on Tom’s Hardware Forum
This I/O device error could be caused by a lot of reasons:
- The transfer mode or the disk interface is not appropriate.
- The target device is damaged/defective.
- The device connection is not successful (bad cable, poor connection or insufficient power supply).
- The compact disk (CD/DVD) is dirty or damaged.
How to fix this?
Solution 1: change transfer mode.
- Right click on This PC.
- Choose Manage.
- Select Device Manager from the left pane.
- Expand IDE ATA/ATAPI controllers in the right pane.
- Right click on the target channel responsible for I/O device error.
- Select Properties.
- Shift to Advanced Settings tab.
- Change the transfer mode to PIO Only.
- Click on the OK button to confirm.
Solution 2: check hardware connections.
Please change a connection cable, USB port and a power supply respectively to see whether the problem can be fixed or not.
Solution 3: clean the surface of device.
If the error occurs on a USB flash drive, external hard drive or CD/DVD, please clear the dirt and stains from the surface properly.
Case 4 – Data Error (Cyclic Redundancy Check)
I’m trying to do a clean install of Win7. I’m installing it through USB I have already deleted the hard drive using Darik's Boot And Nuke. When I try to create a partition from the command prompt it gives me an error “DiskPart Error: Data Error (cyclic redundancy check)” see the system event log for more info.– posted by ed123 on Windows Seven Forums
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.
How to fix this?
Solution 1: check disk.
Please see Parameter Is Incorrect error. Solution 1: enable error-checking function.
Solution 2: rely on chkdsk /f command.
- Run Command Prompt as administrator.
- Type chkdsk /f *: into the Command Prompt.
- Press Enter on the keyboard.
- Wait for the scan to complete.
- Restart computer at the end of the process.
Case 5 – 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.
How to fix?
Solution 1: run troubleshooter.
- Click on the Start button.
- Scroll down to find Windows System and expand it.
- Choose Control Panel.
- Type troubleshooting into the search control panel box or select Troubleshooting in the lower right corner when View by Small icons.
- Click on Configure a device under Hardware and Sound.
- Click on the Next button to detect problems.
- Wait for the detecting process and follow the suggestions that system offers you.
Solution 2: uninstall the USB controller.
- Right click on the Start button.
- Choose Device Manager.
- Find Universal Serial Bus controllers and expand it.
- Right click on the first USB controller.
- Choose Uninstall device.
- Click on the OK button in the pop-up window to confirm.
- Repeat this process to uninstall the rest USB controllers listed under Universal Serial Bus controllers.
- Restart the computer and retry DiskPart to see whether it works or not.
Case 6 – 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.
With the powerful tool I recommend in this article, every one of you is able to recover data from RAW hard drive without troubles.
It is common to run into errors while running DiskPart. Here I have summarized the 6 types of situations that could cause a DiskPart error. For each case, I also analyzed the possible causes briefly as well as gave corresponding solutions to help you recover data and fix the DiskPart has encountered an error issue. Hope these solutions can help you solve your problem.
If you have any questions about DiskPart encountering an error, or if you have better solutions regarding this problem, please feel free to leave a message below.