Error with Clear-NTFSAccess command

Apr 25, 2016 at 9:30 PM
I'm getting an error sporadically when utilizing the Clear-NTFSAccess command in my script.

Image

In doing some quick research, it looks like there's a difference between the .NET Framework FileSystemRights object type and the Win32 API in regards to the property flags that are usable. This TechNet article seems to go over it in good detail.

Anyways, just curious as to why it's showing up when I'm trying to clear the permissions as opposed to adding them. Any thoughts on how I can work around this?

For the record, I'm using 4.2.1, not 4.2.2 (just noticed an update was available). Not sure if that matters.

Thanks