How to fix the “The disk is write-protected. Remove the write-protection or use another disk” error

Last updated on March 30th, 2023 at 05:15 pm

Read Time:54 Second

If you are trying to format a second disk on your computer (or server) and you are getting this error:

“The disk is write-protected.

Remove the write-protection or use another disk.”

Then this could be because the disk is write-protected.

To get around this, you can use the diskpart utility built into Windows.

Open up an elevated command prompt and type the following commands:

  • diskpart
  • list disk – this will show all the disks on your machine
  • sel disk 1 – where 1 is the disk you need to edit
  • detail disk – this will show all the information on the selected disk, including if the disk is write protected under the Read-only attribute

If the read-only attribute states yes, then you need to run the following commands:

  • attr disk clear readonly – this will remove the readonly attribute on the selected disk

You should now be able to access the disk without any issue.


If you have any questions or feedback on this guide, please feel free to leave us a message below in our comments section.

Avatar for Andrew Armstrong

About Post Author

Andrew Armstrong

Founder of TechyGeeksHome and Head Editor for over 15 years! IT expert in multiple areas for over 23 years. Sharing experience and knowledge whenever possible! Making IT Happen.
Click to rate this post!
[Total: 0 Average: 0]

Free Subscription

If you want to be notified when we post more quality guides like this one, sign up to our free subscription service and you will receive an email when a new post is live.

Join 4,418 other subscribers.

No need to worry, we will not be filling your inbox with spam and you can unsubscribe anytime you like.