开发者

Make all users within the domain a member of a security group

Using either Powershell or VBS, how can开发者_StackOverflow中文版 I make all of the users within my domain who have an email address a member of a specific security group?


 import ActiveDirectory
 $Group = Get-ADGroup -filter {Name -eq "GroupName"}
 Get-ADUser -filter {EmailAddress -like "*"} | % {Add-ADGroupMember $Group $_}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜