DiskPart has Encountered an Error Incorrect Function - Fixed

When you encounter diskpart has encountered an error incorrect function, you can refer to this article and find solutions here.


By Dervish / Updated on August 25, 2023

Share this: instagram reddit

Help! "Diskpart has encountered an error: incorrect function"



I have a hard drive and I’m trying to format it and use it as an external drive for transferring data between two PCs. When I plugged it into a USB drive case, the computer recognized it, but it was not accessible. I went to Disk Management and tried to format it, I got "incorrect function". Then I tried to go to admin CMD. Everything went well at first, but when I ran clean or clean all command, the error occurred: DiskPart has encountered an error: incorrect function. See the System Event Log for more information. I don’t know where the problem is, can someone help me with this? Thank you!”


Actually, you may come across this error not only when you try to format the drive, but also when you initialize the disk. Many reasons cause this error. For instance, the drive is write-protected, the drive is damaged, etc.

How to fix "DiskPart has encountered an error: incorrect function"

There are some solutions that you can try to fix "Diskpart has encountered an error incorrect function".

▶ Rescan the disk

When you encounter this issue, it may have something to do with Virtio SCSI driver that require a rescan to show the changes. According to the feedback of some users, you can get it fixed by doing a disk rescan from command prompt. To run the disk rescan, follow the steps below.

1. Open Command Prompt under administrator.

2. Type diskpart and press Enter.

3. At the Diskpart command prompt, type: rescan and press Enter.

▶ Reinstall driver

The damaged driver may cause this issue too. You can uninstall the drivers for the drive and then reinstall the drivers again after restarting your computer.

1. Click Start button, type device manager in the Search Box and hit Enter.

2. Select Device Manager, expand categories to find the name of your hard drive. Right-click the device and select Uninstall, then restart PC. Windows will automatically reinstall the drivers on the hard drive for you.

▶ Remove write protection

There is some possibility to meet this issue when your disk is write-protected, you can remove the write protection and try to format the drive again.

Step 1. Press "Windows + R", type in "diskpart" and hit "Enter".

Step 2. Type "list disk" to show the list of available disks in the system.

Step 3. Type “select disk n”, “n” stands for the disk number of your drive.

Step 4. Type "attribute disk clear readonly". It will change the properties of your SD card so that it is no longer read-only.

Attributes Disk Clear Readonly

Alternative to fix Diskpart incorrect function error easier

If after trying all the methods mentioned above, the error "DiskPart has encountered an error incorrect function" still exists, you may consider using an alternative to DiskPart to manage your disk. AOMEI Partition Assistant Standard is a good alternative tool that provides all features that DiskPart contains.

It is a free partition manager that can help you format all types of disk including SSD, external hard drive, USB drive, SD card, etc. And you can format write protection disk easily. This software is designed for all versions of Windows 11/10/8/7. Let’s see how to solve Diskpart has encountered an error incorrect function with it.

Download Freeware Win 11/10/8.1/8/7/XP
Secure Download

Step 1. Download AOMEI Partition Assistant and launch it.

Step 2. Right-click the disk that you want to format and choose Format Partition.

Format exFAT Partition

Step 3. You can format the disk to NTFS, FAT32, Ext4/3/2, exFAT, FAT32. Choose one among listed File Systems. Then, click on OK.

Format exFAT To FAT32

Step 4. Review the pending operation and click Apply and Proceed to perform it.



Actually, besides the error “DiskPart has encounter an error incorrect function”, you may also meet other errors when using DiskPart like “DiskPart has encountered an error, the media is write protected”, “DiskPart has encountered an error, access is denied”, etc., you can solve all these errors with the help of AOMEI Partition Assistant. Finally, if you want to try more useful features of AOMEI Partition Assistant including partition recovery and partition split, you should turn to Professional Edition.

Dervish · Staff Editor
Dervish is an English editor of AOMEI Technology; He is delicated to offering users easy and effecitve solutions for issuses related to disks and partitoins. In his spare time, he enjoy wathcning films, playing footable, traveling and so on.