# Alternate way to remove read-only attribute $filePath = "C:\path\to\your\file.txt" attrib -r $filePath
Few things are as frustrating as trying to delete, move, or edit a file, only to be met with the error: powershell unlock file
Here is how to remove that block using PowerShell. # Alternate way to remove read-only attribute $filePath