Query User Job Title, First Name & Last Name & all variables

96 views
Skip to first unread message

Brenton Noye

unread,
Feb 23, 2021, 11:17:17 PM2/23/21
to GAM for Google Workspace
Hi,

Just wondering if anybody has come across a way via a Powershell command to query a G-Suite users variables E.G First Name, Last Name & Job Title. I'm trying to create a powershell script that will query this information automatically to fill their Email signature via placeholders for those respective variables.

Thanks a lot,

Brenton


Ross Scroggs

unread,
Feb 24, 2021, 1:12:55 AM2/24/21
to google-ap...@googlegroups.com
Brent,

If you're after the data for a single user do:
gam print users query "email='us...@domain.com'" fields name,organizations > user.csv
If you're setting up for a bulk signature update do:
gam print users fields name,organizations > user.csv

Contents of user.csv

primaryEmail,name.givenName,name.familyName,name.fullName,organizations,organizations.0.title,organizations.0.primary,organizations.0.type,organizations.0.customType
us...@domain.com,Test,User1,Test User1,,Student,True,school,

Use the columns primaryEmail, name.givenName, name.familyName and organizations.0.title

Ross

This E-Mail is confidential.
If you have received this e-mail in error, please notify me by return e-mail and delete the document. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. St John's Primary School Euroa is not liable for the proper and complete transmission of the information contained in this communication or for any delay in its receipt. 
St John's would like to acknowledge the custodians of the land on which we meet, the Taungurung people of the Kulin Nation.
St John's is a Child Safe School where all children are respected and protected from harm.

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/81a0cbef-e528-405b-966a-3261b6cece89n%40googlegroups.com.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages