NTFS权限

问题描述 投票:-2回答:1

我想将用户添加到NTFS权限并完全控制特定文件夹。

这是我在互联网上找到的代码,但它给了我一个错误。

Set-ACL -Path "C:\Program Files (x86)\TEST" -Account "DESKTOP-R5C0QAA\Bobby" -AccessRights FullControl
Set-Acl : A parameter cannot be found that matches parameter name 'Account'.
At line:1 char:45
Set-ACL -Path "C:\Program Files (x86)\TEST" -Account "DESKTOP-R5C0QAA ...
CategoryInfo          : InvalidArgument: (:) [Set-Acl], ParameterBindingException
FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.SetAclCommand
powershell ntfs
1个回答
0
投票

这是我能找到的最简单的方法。

Install-Module NTFSSecurity
Add-NTFSAccess –Path "C:\Program Files (x86)\TEST" –Account "DESKTOP-R5C0QAA\Bobby" –AccessRights FullControl

More info here on NTFS Security module

© www.soinside.com 2019 - 2024. All rights reserved.