cvandal
cvandal

Reputation: 794

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

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

Upvotes: 2

Views: 1680

Answers (1)

Scott Keck-Warren
Scott Keck-Warren

Reputation: 1952

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

Upvotes: 3

Related Questions