开发者

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

开发者 https://www.devze.com 2023-02-15 23:44 出处:网络
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

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

精彩评论

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