DiskPart has encountered an error. How to Fix it?

Summary: When you try to perform an action using the DiskPart utility, you may encounter an error that prevents you from using the utility. In this blog, we’ve shared some common reasons that may result in the DiskPart has encountered an error and the methods to fix the issue.

DiskPart utility, comes with Windows OS, helps in managing your systems drive (drive partitions, volumes, or virtual hard disks.) It usually works even when the built-in Disk Management utility stops responding. Sometimes, when using the utility, you receive errors, such as ‘DiskPart has encountered an error’. The error appears with different messages, including:

  • Access is denied
  • The request could not be performed
  • The request failed due to a fatal device hardware error
  • The parameter is incorrect
  • Data error cyclic redundancy check see the system, event log

What Causes ‘DiskPart has encountered an error’?

This error may occur due to several reasons, such as:

  • Corrupted or damaged file system
  • Inconsistent device connection
  • Unsuccessful program installation
  • Cluttered hard disk
  • Misconfigured files
  • The file system has turned RAW
  • Write-protection is enabled

You can fix the error by using the troubleshooting methods shared in this blog. However, a few methods can cause data loss. So, we’d suggest you either take backup of your device data. If you’re unable to do so, use a powerful data recovery software to recovery your data.

Recover Data from the Disk

Restore data from your hard disk drive using an advanced data recovery software, such as Stellar Data Recovery for Windows. This DIY software can restore data in case of deletion, drive formatting, corruption, and malware attack. If you lose data while fixing the issues with your hard drive using the DiskPart utility, you can use this data retrieval software to get back your data. Follow the given steps:

  • Download, install, and run Stellar Data Recovery for Windows on your system.
  • Select Everything from the initial dashboard or choose the type of data you want to restore and click Next.
Select What to Recover
  • Choose the location/folder/drive from the Recover from screen and then click Scan.
choose the location to scan
  • Once the scanning is complete, you’ll see the results on the screen.
  • Select the files from the results and click Recover.
Select Files to Recover
  • Next, click Browse to choose a location to save the data and click Start Saving.

Note: Don’t save the files at the exact location from where you’ve lost the data to prevent data overwriting.

Also Read: How to Recover Data from Raw Drive?

How to Fix DiskPart has encountered an error?

Here, we’re sharing some common error messages that may occur while using DiskPart utility, along with the possible solutions to fix them.

Error 1: Fix DiskPart has encountered error access is denied

This error may occur if the write-protection is enabled on the drive or the Command Prompt terminal lacks the administrative-level permissions.


To fix the “DiskPart has encountered error access is denied”, you can try disabling the write-protection on the drive on which you’re trying to run the DiskPart utility. To do so, follow the given steps:

  • Open the Run dialog box by pressing Windows + R and type regedit.
  • Now, go to Computer > HKEY_LOCAL_MACHINE from the left pane and then go to SYSTEM.
  • Next, expand and follow CurrentControlSet > Services.
Go to Services
  • After that, scroll down, go to USBSTOR, and double-click on Start given in the right pane.
  • Enter 3 in the Value data column and click OK.
Enter Value data and Press OK
  • Once done, close the registry editor and check if you can use the DiskPart utility without any interruptions.

Error 2: DiskPart has encountered an error the request could not be performed because of an I/O device error

This error usually occurs when Windows faces difficulty performing an input/output action when trying to access a drive. Another reason could be bad sectors on the hard drive or a corrupted drive partition table.


A. Update Disk Driver

Sometimes, a corrupt or outdated device driver may cause this DiskPart error. To get rid of this, you may try updating the disk driver by following given steps:

  • Open Device Manager and then navigate to the device category.
  • Expand the device category, right-click on the driver, and click Update driver.
Click on Update the Driver after pressing the right click on Microsoft AC Adapter
  • On the next prompt, choose ‘Search automatically for updated driver software.’
Search Automatically
  • Let Windows search for the latest driver software for the device.
  • Once found, you can install the latest driver software and check if the problem is solved now.

B. Run CHKDSK Command

CHKDSK command, when run with attributes /f and /r, fixes corruption (if any) on the hard drive. Also, it scans and marks down the bad sectors on the drive. Although, while scanning and marking the bad sectors on the drive, it prevents Windows from reading and storing data from those bad sectors, which result in data loss.

Note: Before you proceed with performing CHKDSK command, we’d suggest you take backup of your data. If you have no backup, you may recover it using a powerful data recovery software.

  • Run Command Prompt as an administrator and type CHKDSK /f/r/d: and press Enter. (Replace d: with your drive letter.)
chkdsk command
  • Wait for the process to complete. Once done, close the Command Prompt window and see if you can use the DiskPart utility.

C. Fix Damaged or Corrupt Hard Drive Partition Table by Rebuilding MBR Boot

As discussed above, another reason for ‘DiskPart has encountered an error’ could be a corrupted drive partition table. You may try fixing it by rebuilding MBR boot. Follow these steps:

  • Type cmd to open Command Prompt and type the following commands one after another and press Enter.



enter BOOTREC.FIXMBR Command
  • Let the process end. Once done, close the Command Prompt window and reboot your system.

Error 3: DiskPart has encountered an error the request failed due to a fatal device hardware error

You may encounter this error when your HDD or SSD is physically or logically damaged and Windows can’t access or perform read-write operations on the drive. Another reason may include an un-initialized disk.


A. Initialize Disk in Disk Management

  • Press Windows + X. Locate and open Disk Management.
  • Next, find the drive appearing as Unallocated.
Locate Drive Appearing Unallocated
  • Right-click on the drive and click Initialize Disk.
Right Click on Drive and Choose Initialize Disk
  • Next, select GPT and then click OK.
Select MBR and Click OK
  • Complete the process. After that, the drive will be listed as Online and Basic.
  • Finally, close the window and check if the error is gone.
  • If Windows doesn’t detect your drive, chances are your hard drive is physically damaged. In that case, you’ll need to replace the hard drive.

Error 4: DiskPart has encountered an error the parameter is incorrect

This error occurs when you format your drive with the NT file system using the DiskPart utility. It occurs due to a damaged file system or bad sectors on the hard drive.


Create New Partition Using DiskPart Utility

To fix this error, you need to clean the disk using DiskPart Utility and create a new drive partition. Follow these steps:

  • Open Command Prompt, type diskpart, and hit Enter.
  • After that, type list disk and select disk X, then press Enter. (Replace X with your drive letter).
  • Then type Clean and press Enter.
  • Next, create partition primary and hit Enter.
  • Type select partition 1 and press Enter.
  • Now, type format fs=ntfs quick and hit Enter.
  • Type assign letter=Z and press Enter.
  • Finally, type exit and Enter.
Create a new Partition in DiskPart
  • Close the Command Prompt window and reboot your system to check if the problem is fixed.

Error 5: DiskPart has encountered an error data error cyclic redundancy check see the system event log

This error may occur due to several reasons. However, the primary reasons include hard drive corruption, registry file corruption, misconfigured files, cluttered disk, unsuccessful program installation, etc. The CRC (Cyclic Redundancy Check) error is quite a severe issue. You need to resolve this error immediately to avoid system failure and data loss. There are different types of CRC errors, such as:

  • Data Error (CRC) Error Message in Outlook
  • Drive Is Not Accessible Data Error (Cyclic Redundancy Check)
  • Cyclic Redundancy Check Error on an optical disc (CD, DVD, etc.)


Read more about: How to Fix Cyclic Redundancy Check Error and Fix It

Essential Tips to Prevent Disk Errors and Data Loss

Safely Remove the Hard Drive

Whenever you eject or remove the hard drive, do it cautiously to prevent any damage to the drive. Once the hard drive is damaged, physically or logically, you may encounter multiple disk errors.

Check Hard Drive Health

Always keep a track of your hard drive’s health status. You can do it by using a powerful Drive Monitor utility, which comes with Stellar Data Recovery Professional software. It monitors the key attributes – temperature, drive health, and performance – of a hard drive to help avoid any data loss due to impending disk failure. In addition, you can also find bad sectors on the drive for evaluating whether the hard drive can withstand a routine data recovery process. This way, you may protect your data by taking its backup on time and also get the hard drive repaired or replaced according to the situation.

Take Regular Backup

To avoid data loss, it is always suggested to take backup regularly. You can use Windows built-in backup utilities, such as Backup & Restore (Windows 7) or File History. You can also create a backup on another storage drive.


The ‘DiskPart has encountered an error’ may occur due to various reasons. In this blog, we’ve mentioned the methods to fix the error. You can follow the given DIY (do-it-yourself) methods to resolve the issue. Furthermore, due to this error, you may end up losing access to the data. In such a case, you can use Stellar Data Recovery for Windows to get back your data. This DIY data recovery software supports recovery from Windows PCs, laptops, and external storage media drives, such as HDDs, SSDs, USB drives, SD cards and more.  

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.