Diskpart is a powerful utility from Microsoft that lets users manage their computer’s internal drive and external drives connected to their computers. You can use Diskpart to create partitions on your disk, format your disk or a disk partition, etc. Some users are experiencing an error while using the Diskpart utility to format their drive. According to them, when they execute the command format fs=ntfs using the Diskpart utility, they get the error message “Diskpart has encountered an error: The parameter is incorrect.” If you are facing the same problem with the Diskpart utility, this article may help you fix it.
Diskpart has encountered an error, The parameter is incorrect
The “Diskpart has encountered an error: The parameter is incorrect” error may occur due to several reasons, like virus or malware infection, faulty hardware, power surge, etc. When you disconnect an external hard drive from your computer, it is recommended to use the Safely Remove Hardware feature. But some of us don’t care about it and disconnect the external storage device without using the Safely Remove Hardware feature. This may cause the external storage device to malfunction.
Let’s see the fixes to resolve this problem.
- Run Chkdsk scan
- Run SFC scan
- Clean your disk and create a new partition
Below, we have explained all these methods in detail.
1] Run Chkdsk scan
Your hard disk might have some errors or bad sectors due to which the Diskpart utility is giving you the “The parameter is incorrect” error message. Chkdsk is a utility that scans a hard disk for errors and bad sectors and repairs them (if possible). Run the Chkdsk command and see if this fixes the problem.
To run the Chkdsk scan, launch Command Prompt as Administrator, type the following command and hit Enter.
chkdsk d: /f
In the above command, replace the letter d with the drive letter which you want to scan with the Chkdsk utility. The Chkdsk command uses several parameters. Each of these parameters has a different purpose. Some of these parameters are given below:
- The /f parameter in the Chkdsk command scans a disk for logical errors or data corruption.
- You can use the /r parameter in the Chkdsk command to locate and repair the bad sectors on a drive.
If you want to scan and repair your drive for both logical errors and bad sectors, you have to use the following Chkdsk command:
chkdsk C: /f /r
After running the Chkdsk scan, check if the issue is fixed or not.
Related: DiskPart error, Data error cyclic redundancy check
2] Run SFC scan
If running the Chkdsk command does not fix your problem, run the SFC scan. The System File Checker scans your system for corrupted system files and repairs the corrupted system files (if possible).
If you are getting the “The parameter is incorrect” error message on an external drive while using the Diskpart utility, you can run the SFC scan on your external drive.
3] Clean your disk and create a new partition
According to the users, they are getting the “The parameter is incorrect” error when they type the format fs=ntfs command after selecting the targeted volume on a particular disk. To resolve the error, you have to clean your disk before using the
format fs=ntfs command.
The steps for this are as follows:
Launch the Command Prompt as administrator.
Type Diskpart and hit Enter.
Type list disk and press Enter. After that, Windows will show you all the disks.
Now, type select disk p. In this command, you have to replace the letter p with your disk number. For example, if you are performing actions on your disk 1, then you have to type the command select disk 1. After that press Enter.
You will see a message “Disk p is now the selected disk.”
Type clean and hit Enter. Wait till you see the message “Diskpart succeeded in cleaning the disk.”
Type create partition primary and press Enter. You will receive a message “Diskpart succeeded in creating the specified partition.”
After creating a new partition, you have to execute the format command.
Type format fs=ntfs quick and hit Enter. After the process gets completed, Diskpart will give you the message “100 percent completed.”
Now, assign a new letter to your disk. Type assign letter=k. You can assign any drive letter to the disk except those which are already assigned to the other disks.
Type exit and hit Enter.
This will close the Command Prompt.
If the above method does not work, repeat the above steps again. But this time, you have to use the clean all command in place of the clean command.
How do I fix Diskpart has encountered an error: The parameter is incorrect, see the system event log for more information?
If you receive the error message “Diskpart has encountered an error: The parameter is incorrect,” your disk might be corrupted or have bad sectors. To fix this problem, first, run the Chkdsk and SFC scans. If this does not fix the problem, you have to clean your disk completely. After cleaning the disk, run the format command in the Command Prompt and create a new partition.
- DiskPart error, The device does not recognize the command
- Diskpart has encountered an error, The media is write protected
- Diskpart Virtual Disk Service error Delete is not allowed
How do I clean Diskpart?
The clean command in Diskpart erases the entire disk along with the partitions. After cleaning the entire disk, you can create new partitions on it by using the Diskpart utility. We have explained the entire process above in this article.
Hope this helps.