On occasion, I have encountered folders or files getting flagged with incorrect attributes.  Some of these are easy to address, such as read only.  The more problematic changes tend to be when something gets flagged as system.

Fortunately, powershell offers a very concise and easy way to reset the attributes of a folder or file back to their default values.

$path = 'F:\stuff'
$dir = get-item $path -force
$dir.attributes = 'Normal'

This script will get an item that may otherwise be inaccessible and reset its attributes back to whatever is normal for that item type.  Just replace the value for $path with the path to the item you are concerned with.

Script Disclaimer, for people who need to be told this sort of thing:

Never trust any script, including those that you find here, until you understand exactly what it does and how it will act on your systems. Always check the script on a test system or Virtual Machine, not a production system. Yes, there are always multiple ways to do things, and this script may not work in every situation, for everything. It’s just a script, people. All scripts on this site are performed by a professional stunt driver on a closed course. Your mileage may vary. Void where prohibited. Offer good for a limited time only. Keep out of reach of small children. Do not operate heavy machinery while using this script. If you experience blurry vision, indigestion or diarrhea during the operation of this script, see a physician immediately.

Credit for this fantastic disclaimer goes to Buck Woody (BlogTwitter).