在PowerShell中删除文件的访问规则
我有以下内容:
$dir = ".\AES.key"
$Acl = Get-Acl -Path $dir
$Acl.Access | ft
返回我:
FileSystemRights AccessControlType IdentityReference IsInherited InheritanceFlags PropagationFlags
---------------- ----------------- ----------------- ----------- ---------------- ----------------
FullControl Allow NT-AUTORITÄT\SYSTEM True None None
FullControl Allow VORDEFINIERT\Administratoren True None None
FullControl Allow GOOGLE\steso True None None
是否有任何方法可以删除所有条目,除了“ google \ steso ”,powershell。提前致谢
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将其放在这里,因为单个评论字符串将太长。
您所显示的是“继承权限”
***常见的限制是,如果不明确删除继承权,就无法删除继承的权限。***
详细信息在这里:
这可能会导致您的问题,而无需仔细确定为什么需要这样做。这意味着,如果您打破继承,那么继承的权限将不再存在删除。
也请参阅其他讨论:
I am putting this here as it will be too long for a single comment string.
What you are showing is 'Inherited permission'
*** The common refrain is, you cannot remove inherited permissions without specifically removing inheritance.***
Details are here:
This can cause you issues without carefully determining why you need to do this. Meaning that if you break the inheritance, then the inherited permissions won't be there anymore to remove.
See this other discussion as well: