Diskpart Failed to Clear Disk Attributes error in Windows 11/10 Fix

WRITTEN BY: supportmymoto.com STAFF

Chances are you’ll come throughout “Diskpart did not clear disk attributes” error when making an attempt to switch information to your USB pen drive or SD card. The error implies that the disk is write-protected and that you simply can not write any knowledge on it. There will be many explanation why Diskpart fails to work, for example, you can not run Diskpart as administrator, system acquired RAW, system acquired locked attributable to virus, and so forth. Fortuitously, now we have a couple of options for this subject. However, earlier than you proceed with the fixes, ensure that the bodily write-protection swap on the USB pen drive is just not turned on. Whether it is, make certain to change it off. Now, join the USB pen drive and proceed with the beneath strategies.

Technique 1 – Examine whether or not the USB has any Write safety swap or button on it

Some USB units have a sliding swap to guard writing off knowledge. Please examine whether or not it exists and switch it off after which attempt once more.

Write Protect Switch Min



Technique 2: By Checking the Drive Area Utilization and File Attributes


Firstly, you need to make certain if there’s sufficient area and disable the read-only attribute of information as a result of the write-protection error might come up attributable to area scarcity or the read-only attributes of the file. Let’s see how.


Step 1: Proper-click on Begin menu and choose File Explorer.


Start Right Click File Explorer


Step 2: Within the File Explorer window, go to the file/folder location that you simply need to switch to the exterior exhausting drive.

Proper-click on the file/folder and choose Properties.


File Explorer Navigate To File Or Folder Location Select File Or Folder Right Click Properties


Step 3: Within the Properties window, below the Basic tab, navigate to the Attributes possibility on the backside and uncheck the field subsequent to Learn-only.

Press Apply after which OK to avoid wasting the adjustments and exit.


Properties General Attributes Read Only Uncheck Apply Ok


Now, run the DiskPart command once more and the issue must be solved.

Technique 2: By Eradicating Write Safety Through Registry Editor


If the USB exhausting drive is locked or reveals the “disk is write-protected” error, then you’ll be able to take away the mode and unlock your pen drive utilizing the Registry Editor.

However, earlier than you make any adjustments to the Registry Editor, just be sure you create backup of the Registry knowledge. That is to make sure, in case you lose any knowledge within the course of, you’ll be able to get better that knowledge.


Step 1: Press Win + R shortcut keys in your keyboard to open the Run command field.

Step 2: Now, write regedit within the search field and hit Enter.


Win + R Run Command Regedit Ok


Step 3: This may open the Registry Editor window.

Now, navigate to the beneath path within the Registry Editor:




Now, below the Management folder, search for StorageDevicePolicies. If the secret is lacking, you would want to create the brand new key.

Proper-click on Management > New > Key.


Registry Editor Navigate To Path Control Right Click New Key


Step 4: Rename the important thing as StorageDevicePolicies. 


New Key Rename Storagedevicepolicies


Step 5: Choose StorageDevicePolicies after which go to the fitting aspect of the pane and right-click on an empty area. Choose New after which DWORD (32-bit) Worth from the right-click menu.


Registry Editor Storagedevicepolicies Right Side Right Click New Dword (32 Bit) Value



Step 6: Rename the DWORD Worth as WriteProtect.


New Dword Rename Writeprotect



Step 7: Double-click on WriteProtect to open the Edit Worth dialogue field.

Now, go to the Worth knowledge area and set it to .

Press OK to avoid wasting the adjustments and exit.


Edit Dword (32 Bit) Value Value Data 0 Ok


Shut the Registry Editor window and restart your PC. Now you can attempt transferring the info to the pen drive and the read-only attribute must be gone now.

Technique 3: By Reformatting the USB From RAW to One thing Else


If the USN pen drive you might be utilizing is with RAW format, you may get read-only error and it may be fastened utilizing DiskPart. This will occur attributable to incorrect partition format. Due to this fact, you would want to reformat the drive. Let’s see how.


Step 1: Proper-click on Begin menu and choose Run.


Desktop Start Right Click Run


Step 2: It’ll open the Run command field. Within the search area, sort diskpart and hit Enter:


Run Command Diskpart Enter


Step 3: Press OK within the UAC immediate to run DiskPart as administrator.

Step 4: Run the beneath instructions one after one other and hit Enter every time:


checklist quantity
choose quantity n

(the place n is the RAW drive)

format fs=fat32 fast

(you’ll be able to substitute “fat32” with “ntfs” or “exfat” as properly)


*Word – You can too sort attributes disk to view the standing of the chosen disk.

The drive will now be reformatted and recognized by Home windows.

Now you can attempt working the disk attributes clear command or just write knowledge to listing.

Technique 4: By Checking Laborious Drive for Errors


For disks with unhealthy sectors, likelihood is that the disk clear read-only of the DiskPart attributes don’t work. To examine and restore the unhealthy sectors, observe both of the beneath options.


Answer 1: Utilizing the Error Checking Software


Step 1: Press the Win + E keys collectively in your keyboard to open the File Explorer.

Step 2: Within the File Explorer window, click on on This PC shortcut on the left after which on the fitting aspect of the pane, right-click on the write-protected drive (in our case it’s the C drive) and choose Properties.


File Explorer This Pc Write Protected Drive Right Click Properties


Step 3: Within the Properties window, go to the Instruments tab and below Error checking, press the Examine button.


Properties Tools Check


Step 4: Subsequent, press Scan drive choice to examine and restore the unhealthy sectors.


Error Checking Prompt Scan Drive


Now, run the DiskPart command and examine if the issue is solved.


Answer 2: By Working the CHKDSK Command


Step 1: Press the Win + X hotkey in your keyboard and choose Run to open the Run command.


Run Windows 10


Step 2: Within the Run command search field, sort cmd and press Ctrl + Shift + Enter keys collectively in your keyboard to open the Command Prompt in elevated mode.


Run Command Search Cmd Enter


Step 3: Within the Command Immediate (admin) window, run the beneath command and hit Enter:


chkdsk F:/f


*Word – Right here, F is the drive letter, so you’ll be able to substitute it along with your drive letter.


Command Prompt (admin) Run Chkdsk Command Enter


Let the method full. It’ll examine and restore the unhealthy sectors routinely. Now you can run the DiskPart command and switch file to the USB drive.


If not one of the above methodology works, you’ll be able to examine for {hardware} issues on the storage system, as a result of there are probabilities that could be the explanation. At occasions, the flash drive may additionally be shut to finish of its life and therefore the DiskPart fails to clear attributes. Examine if the storage system is throughout the guarantee interval. If sure, then contact the producer to get a restore achieved.If not, then both pay for the restore or get it changed.

NOTE : Please do not copy - https://supportmymoto.com
See also  How To Delete Temporary Files & Other Junk On a Smartphone or Tablet

Leave a Reply