Account.Set.Group.Global
Top  Previous  Next


Sets / edits user account global group membership

Category
SamAccount

Script section
[Batch], inside Data.Loop..EndLoop statement

Account.Set.Group.Global SamAccountNameColumnVariable, Group1, group2, ..., group10

SamAccountNameColumnVariable
Format: "%colX%", X = Column in [Data] section with existing SamAccountNames  

Group1..GroupX

The account is added to all listed groups that it is not already a member of and removed from all groups not listed.  
 
The first group in the list is set as primary group.  
 
All accounts created will always at first be members of the group "Domain Users", which also will be the primary group. If you set another primary group and remove accounts from the "Domain Users" group, make sure to assign privileges to the new group (user manager/policy/user rights) so it gets basic access to the system.  

Other parameters
This command is executed on the current machine in the [Machines] section.  

Example
Set group membership for accounts listed in column 2 to "domain users" and "teachers"

Account.Set.Group.Global %col2%, domain users, teachers