你好同仁IT大师的
我希望在这里获得一些有关通过PowerShell来pipe理Active Directory委托权限的知识。
我最近遇到了一个问题,我想让多个用户能够将用户添加或删除到全局安全组中。
我熟悉通过AD添加多个用户的繁琐方法:
1. security tab, add, enter users name, uncheck all permissions for said user 2. click advanced tab, double click users name, ensure type is set to “Allow” and applies to is set to “this object only” 3. scroll through the entire list of permissions, and ensure only “write members” has a tick mark 4. ok, ok.
我已经研究了这个主题的互联网,我只遇到了cmdlet,为多个用户提供了pipe理分发列表的function1. Set-DistributionGroup -Identity'-ManagedBy'user1','user2','user3
虽然这个命令是有帮助的,但这不是我正在寻找的。 我也testing了下面的命令无济于事
1. Set-Group -Identity '<DL_name>' -ManagedBy 'user1', 'user2'
我刚接触PowerShell,并且已经阅读和研究过,所以如果我完全错误的话,请让我知道。
非常感激。
公平的警告。 如果您不熟悉Windows权限的工作方式,以编程方式修改Windows权限(在任何情况下)都会有相当陡的学习曲线。
您将要处理的Powershell cmdlet是Get-Acl
和Set-Acl
与.NET类System.DirectoryServices.ActiveDirectoryAccessRule
。
修改对象权限的高级概述如下所示:
Get-Acl
检索对象的当前权限 ActiveDirectoryAccessRule
对象 AddAccessRule
方法 Set-Acl
。 这应该让你开始正确的道路。
按照Corey的评论,这里有一篇很好的博客文章,通过一些示例将它们连接在一起: 通过PowerShell进行Active Directory委派