How to add Domain Users to Group in Active Directory through vbscript

In order to add domain user to domain group first get the group object then get the domain user from active directory, then add user's ADsPath to group as shown in below sample code.
Set objGroup = GetObject("LDAP://CN=TestGroup,OU=TestOU,DC=TEST,DC=com")
Set objUser = GetObject("LDAP://CN=TestUser,OU=TestOU,DC=TEST,DC=com")
Wscript.echo "Successfully added user TestUser to TestGroup"


Popular posts from this blog

Error : login failed on rabbitmq web-management console

MSMQ error : "A workgroup installation computer does not support the operation."

How to flash CWM Recovery to Samsung Galaxy SL( GT-I9003) using Odin