raandree / NTFSSecurity

Managing permissions with PowerShell is only a bit easier than in VBS or the command line as there are no cmdlets for most day-to-day tasks like getting a permission report or adding permission to an item. PowerShell only offers Get-Acl and Set-Acl but everything in between getting and setting the ACL is missing. This module closes the gap.
MIT License
431 stars 61 forks source link

Get-ntfsOrphanedAccess directory name issue #3

Open raandree opened 8 years ago

raandree commented 8 years ago

This issue was imported from CodePlex

JBinMN wrote 2016-06-22 at 23:06 When passed directory names containing curly braces of either hand, Get-NTFSOrphanedAccess throws the following error:

Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

+ CategoryInfo          : NotSpecified: (:) [Get-NTFSOrphanedAccess], FormatException
+ FullyQualifiedErrorId : System.FormatException,NTFSSecurity.GetOrphanedAccess

I can work around it by filtering the output of get-childitem (or get-childitem2) :

where {$_.name -notmatch '{|}'}