How to Format Write Protected Pendrive in CMD Windows 10, 8, 7?

In this article, we will tell how to format write protected pendrive in CMD step by step. Besides, you can also use the recommended freeware to format write-protected pendrive, USB flash drive or other hard drives.


By Emily / Updated on May 12, 2023

Share this: instagram reddit

Hot issues about write protected pen drives

User Case 1. When I format my USB any time, it shows “The disk is write-protected”. I also tried to format it in Disk Management, right-click it and select format. But my USB is not format. When formatting is close to complete 100%, again the message “The operation did not complete because the media is write-protected”. How can I format my USB? Please help me! —from forum

Disk Write Protected

User Case 2. Hi there, I have a problem with my SD CARD. I can't reformat it on my WIN 10 computer, I can't add something to it or remove it! either I always get this error "Windows was unable to complete the format". How to fix it? —from tomsguide

Windows Was Unable To Complete Format

Have you ever met such an annoying issue? If you cannot format drives successfully in Windows 11/10/8/7 because it is write-protected, you can learn how to format write-protected pendrive in CMD.

Possible reasons for write-protected pen drive

Usually, when pendrives, USB flash drives, or SD cards become write-protected, you cannot delete files from SD card, or make other modifications. As for the reasons behind this issue, refer to the list below.

◐Your pendrive is damaged by virus infection, hacker or malware.

◐The file system of partition on the drive is corrupted.

◐You set the read-only mode unconsciously.

◐Your pendrive has physical damages or been dead.

How to force format write protected pen drive in CMD?

Since the pen drive is write-protection, you cannot format it through traditional methods, here we would like to tell how to format write-protected pendrive from Command Prompt: clear read only attribute first and then format it.

Step 1. Click on Search box and input cmd, select command Prompt (Admin).

Step 2. Type diskpart and hit Enter.

Step 3. Type list disk and hit Enter. Here, you’ll be able to see a list of storage media connected to your computer.

Step 4. Type select disk and press Enter. For example, select disk 2 in my case. Make sure you enter the number correctly.

Step 5. Type attributes disk clear readonly and press Enter: this command will clear the write protection attribute from the selected disk.

Remove Write Protection CMD

Now, the pendrive is no longer write protected. Then you can format it as normal. If you want to format it using cmd, please continue typing the commands as below and remember to press Enter after each.

  • clean

  • create partition primary

  • format fs=ntfs

  • exit

Format Write Protect CMD

Freeware: format write-protected pen drive more easily

If the write protection attribution is caused by damaged file system, then you need a 3rd party write-protected pen drive format tool. Here we strongly recommend free AOMEI Partition Assistant Standard. This freeware could format the hard drive that is write-protected due to corrupted file system. Besides, this versatile disk manager is also able to help easily format corrupted SD card, format large hard drive to FAT32, format partition to Ext4, resize partition, delete partitions, copy partition, etc. Just3 clicks are required.

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

Step 1. Download and install AOMEI Partition Assistant on your computer, run the program. Select your pen drive, right-click it and choose “Format Partition”.

Format exFAT Partition

Step 2. Choose the desired file system (here we choose FAT32) and click “OK”.

Format exFAT To FAT32

Step 3. Back to the main interface, click “Apply” > “Proceed” to execute the changes.


Final words

Now, you are sure to know how to format write protected pendrive in cmd. Obviously, AOMEI Partition Assistant provides an easier way to format write protected pendrive than Command Prompt in Windows 11/10/8/7. Just three steps, the formatting process will be finished. Also, you can upgrade to AOMEI Partition Assistant Pro to enjoy more amazing functions. It allows you to copy OS from laptop to pendrive, wipe pendrive completely, clone pendrive, recover lost partitions and more.

Emily · Staff Editor
Emily is an English editor of AOMEI Technology; she has a great passion for providing easy solutions for people to tackle with all disk or partition management problems. In addition to writing articles about disk/partition management, she also edits great tutorials on how to back up and restore disk for data security. In her spare time, she loves to learn computer skill to improve herself or stay with her family to enjoy a good day.