goto GAMcommands
Run GAM to replace group membership in the HS and MS student email groups.
Group Owners and Managers are not affected.
2022-10-03 Andrew Schott<andrew@joletec.com>
:GAMcommands
rem Remove existing member-level users from the High School group
C:\GAM\gam.exe update group highschool@stu.mtcps.org clear member
rem Find all users under the High School OU and add them as members to the High School group
C:\GAM\gam.exe print users query "orgunitpath:'/Students/@stu.mtcps.org/Mount Clemens High School'" | gam csv - gam update group highschool@stu.mtcps.org add ~primaryEmail
rem Remove existing member-level users from the Middle School group
C:\GAM\gam.exe update group middleschool@stu.mtcps.org clear member
rem Find all users under the Middle School OU and add them as members to the Middle School group
C:\GAM\gam.exe print users query "orgunitpath:'/Students/@stu.mtcps.org/Mount Clemens Middle School'" | gam csv - gam update group middleschool@stu.mtcps.org add ~primaryEmail