User's DeviceID(s)

113 views
Skip to first unread message

Joshua Lee

unread,
Oct 20, 2017, 8:01:37 PM10/20/17
to GAM for G Suite
Is there a way to pull just the deviceID(s) for a specific email account? I'm trying to automate my company's termination process and part of that is to delete/wipe all devices that a user has. I see that it can be done through GAM, but that you need to know the specific deviceID. What I'm hoping for is to be able to use powershell to disable the AD account, reset, password, etc, and then use it to call GAM to reset the email account password, and then delete/wipe all of the devices that user owns. But I don't want my techs to have to open up Google Admin console to find the deviceID to run my script. 

Ross Scroggs

unread,
Oct 21, 2017, 10:55:46 AM10/21/17
to google-ap...@googlegroups.com
Josh,

Here's a start:
gam print mobile fields resourceId,email query "email:user@domain.com

gam print cros fields deviceId,user query "user:user@domain.com"

Ross

On Oct 20, 2017, at 4:57 PM, Josh Lee <joshua...@gmail.com> wrote:

Is there a way to pull just the deviceID(s) for a specific email account? I'm trying to automate my company's termination process and part of that is to delete/wipe all devices that a user has. I see that it can be done through GAM, but that you need to know the specific deviceID. What I'm hoping for is to be able to use powershell to disable the AD account, reset, password, etc, and then use it to call GAM to reset the email account password, and then delete/wipe all of the devices that user owns. But I don't want my techs to have to open up Google Admin console to find the deviceID to run my script. 

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/564fc367-405e-46b4-9fac-d1b664427678%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joshua Lee

unread,
Oct 23, 2017, 6:03:47 PM10/23/17
to GAM for G Suite
Thanks! I thought I had tried something similar to that, but I couldn't figure out how to get it to return just the device ID. 


On Saturday, October 21, 2017 at 7:55:46 AM UTC-7, Ross Scroggs wrote:
Josh,

Here's a start:
gam print mobile fields resourceId,email query "email:user@domain.com

gam print cros fields deviceId,user query "user:user@domain.com"

Ross

On Oct 20, 2017, at 4:57 PM, Josh Lee <joshua...@gmail.com> wrote:

Is there a way to pull just the deviceID(s) for a specific email account? I'm trying to automate my company's termination process and part of that is to delete/wipe all devices that a user has. I see that it can be done through GAM, but that you need to know the specific deviceID. What I'm hoping for is to be able to use powershell to disable the AD account, reset, password, etc, and then use it to call GAM to reset the email account password, and then delete/wipe all of the devices that user owns. But I don't want my techs to have to open up Google Admin console to find the deviceID to run my script. 

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages