Gestionar grupos de un usuario

151 views
Skip to first unread message

Ivan

unread,
Apr 19, 2017, 11:57:06 AM4/19/17
to GAM for G Suite
Hola!

A ver si alguien me puede ayudar :)

Me gustaría saber si puedo realizar ambas acciones y como:
 - Añadir a un usuario a todos los grupos a los que pertenece otro usuario diferente.
 - Eliminar todos los grupos a los que pertenece un usuario.

Muchas gracias de antemano!

Jay Lee

unread,
Apr 19, 2017, 12:01:23 PM4/19/17
to google-ap...@googlegroups.com
 - Añadir a un usuario a todos los grupos a los que pertenece otro usuario diferente. - Add a user to all groups to which a different user belongs.

gam print groups member differe...@example.com | gam csv - gam update group ~Email add a_u...@example.com
 
 - Eliminar todos los grupos a los que pertenece un usuario. - Delete all the groups to which a user belongs.

gam print groups member a_u...@example.com | gam csv - gam delete group ~Email

Jay 

Ivan

unread,
Apr 19, 2017, 12:02:42 PM4/19/17
to GAM for G Suite
Hola!

No hay opción sin recurrir a un archivo externo? mi idea a ser posible era en una única orden :)

Gracias!

Jay Lee

unread,
Apr 19, 2017, 12:06:17 PM4/19/17
to google-ap...@googlegroups.com
On Wed, Apr 19, 2017 at 12:02 PM, Ivan <iga...@intercomempresas.com> wrote:
No hay opción sin recurrir a un archivo externo? mi idea a ser posible era en una única orden :)

No external file is used by those commands. The "gam print group members..." command will output a CSV, | (pipe) will push the output of that command to the second command, "gam csv -..." will read the output of the first command and use it as the CSV input. So GAM is dynamically getting the list of groups and then adding a member or deleting the groups.

Jay 

Ivan

unread,
Apr 19, 2017, 12:08:16 PM4/19/17
to GAM for G Suite
Ok! thank you so much!
Reply all
Reply to author
Forward
0 new messages