“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 plug it into a USB drive case, the computer recognizes it, but it is not accessible. I go to Disk Management and tried to format, I get "incorrect function". Then I try to go to admin CMD. Everything went well at first, but when I run 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, you may also meet this error 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?
To fix this error, you can try the methods below.
Rescan the disk
When you encounter this issue, it may be has something to do with Virtio SCSI driver that required 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 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.
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. Open the command prompt. Type "diskpart" to start the utility.
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. This step will change the properties of your SD card so that it is no longer read-only.
Fix Diskpart incorrect function error in another way
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 is a good alternative tool that provides all Diskpart features.
It is a free partition manager that can help you to 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 10/8/7. Let’s see how to solve Diskpart has encountered an error incorrect function with AOMEI Partition Assistant.
Step 1. Download AOMEI Partition Assistant and launch this software.
Step 2. Right-click the disk that you want to format and choose Format 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.
Step 4. Review 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 with AOMEI Partition Assistant.