Say, you get a list of groups and users which need to be in them, how do you quickly add the users to the groups?
For example, Andriy had to import group membership from files like:
Orgname Username
OP-420-HO-S-00 net1111
RB-430-AD-A-12 net2222
AC-200-RL-B-10 net1234
In which Orgname
is indeed the name of the group.
In such cases, Import-CSV and Add-QADGroupMember are your friends. Just don’t forget to properly specif the column numbers and the delimiter used in the files you get:
Import-Csv C:\list.csv -Delimiter ' ' | ForEach-Object { Add-QADGroupMember -Identity $_.Orgname -Member $_.Username }
1 Response to “Import file to change group membership”