Sha256: 11a406d44d0417a323a86927be2ebafd7c6145c1fdc9ceebb08167d4cb79bdec
Contents?: true
Size: 405 Bytes
Versions: 16
Compression:
Stored size: 405 Bytes
Contents
function CheckFileAccessRules { param($path, $identity, $rules) $result = $false $accessRules = (Get-Acl $path).access | Where-Object {$_.AccessControlType -eq 'Allow' -and $_.IdentityReference -eq $identity } if ($accessRules) { $match = $accessRules.FileSystemRights.ToString() -Split (', ') | ?{$rules -contains $_} $result = $match -ne $null -or $match.length -gt 0 } $result }
Version data entries
16 entries across 16 versions & 1 rubygems