get-acl


0
Q1495865732 asked 7 年 ago

怎么用Powershell筛选出账号在哪些文件夹有权限

1 Answers
0
Mooser Lee 管理员 answered 7 年 ago

类似的问题已在:《如何确定用户组的作用?》 回复,这是不可能的。

Q1495865732 replied 7 年 ago

用get-acl得到权限,然后用where去筛选可以得到Owner那一项。但是筛选Access就没任何结果出来。

Mooser Lee 管理员 replied 7 年 ago

PS> $acl = Get-Item request.inf | Get-Acl
PS> $acl.Access

FileSystemRights : FullControl
AccessControlType : Allow
IdentityReference : NT AUTHORITY\SYSTEM
IsInherited : True
InheritanceFlags : None
PropagationFlags : None

FileSystemRights : FullControl
AccessControlType : Allow
IdentityReference : BUILTIN\Administrators
IsInherited : True
InheritanceFlags : None
PropagationFlags : None

FileSystemRights : FullControl
AccessControlType : Allow
IdentityReference : PSTIPS\Mosser
IsInherited : True
InheritanceFlags : None
PropagationFlags : None

Q1495865732 replied 7 年 ago

这个只是看权限,我的意思得到权限后,筛选子文件夹哪个文件夹有特定用户的权限