How to add or remove Write Protection from a USB flash drive on Windows 11.
If you have connected a USB drive to your computer and can’t format it or change any of the data because you are getting a “The disk is write protected” error message. Or you just want to add write protection to a USB drive, this article will show you how to enable or disable Write Protection on USD drives on Windows 11.
Related: How to Create, Merge, Shrink or Extend Partitions on Windows 10.
Not a lot of people are aware of this but it is possible to add write protection to USB drives in order to prevent them from being accidentally formatted or to prevent anyone from changing their contents. While the process is relatively quick and easy to enable you may also wish to disable it if you find yourself using a USB drive with write protection enabled.
More often than not you probably won’t know that a USB drive is write-protected until you go to make a change on the device. This will trigger Windows to show you the following error message: “The disk is Write Protected”. Alternatively, you can also check using the Command Prompt tool which we will cover below.
How do you check if a USB drive is write protected using Command Prompt?
This can be done by typing CMD into the start menu and selecting Command Prompt from the menu (right-click and open as administrator). Next, in the open CMD window enter the following commands, pressing Enter after each.
Diskpart
List Disk
Select Disk X
Attributes Disk
(X is the number next to the disk listed. Sadly you will have to go by space as they don’t list by drive letters)
Once you have typed the final command you will see the Read-only state of the drive. If it is set to No write protection isn’t enabled. If it says Yes write protection is enabled and you will have to disable it.
How to Disable Write Protection on USB drives on Windows 11.
Now that you know how to check if a drive had write protection enabled you can either enable or disable it using the following process.
- First open Command Prompt as administrator by searching CMD from the Start menu, then right-click on it and select Run as administrator.
Diskpart
List Disk
Select Disk X
(X is the number next to the disk listed. Sadly you will have to go by space as they don’t list by drive letters)
To Disable write protection type the following command and press Enter.
Attributes Disk Clear Readonly
How to Enable Write Protection on USB drives on Windows 11.
-
First open Command Prompt as administrator by searching CMD from the Start menu, then right-click on it and select Run as administrator.
Diskpart
List Disk
Select Disk X
(X is the number next to the disk listed. Sadly you will have to go by space as they don’t list by drive letters)
To Enable write protection for the USB drive, type the following command and press Enter.
Attributes Disk Set Readonly
Important information regarding write protection on USB drives.
It is important to note that write protection is only valid on the computer you enabled it on. For example, if you enable write protection on a USB drive on your desktop then use that USB in your laptop write protection will not be enabled. While it is a handy feature to use it isn’t a fail-safe to prevent your data from being removed.