views:

58

answers:

1

How to add the distrubtion group from Powershell in Active Directory ?

I have user in active directory and i want to add the user into particular group rather than going and server because that part is going to be outsourced.

so how to add the distrubution group for particular user.

+1  A: 

Here's the basic code:

$group = [adsi]"LDAP://CN=Group1,OU=Groups,DC=domain,DC=com" $group.member.Add('CN=User1,OU=Users,DC=domain,DC=com')
$group.SetInfo()

Shay Levy