Download OU specific List of users instead of the total users.

已查看 3,170 次
跳至第一个未读帖子

Harshit Srivastava

未读,
2016年8月18日 19:12:532016/8/18
收件人 Google Apps Manager
Google Offers a way to download a list of all users in a domain, but I want to download a list of users in a specific OU(Organizational Units) alongwith their drive size.
Is there a way in GAM to do that?
I have two options in my mind

Access a filtered user list for suspended OU that features a "drive storage" or "email storage"

Access a full account user list csv for the whole account together that features a "drive storage" and "email storage" and "organizational Unit" column.

Please let me know if this is possible.

Ian Crew

未读,
2016年8月21日 23:21:552016/8/21
收件人 google-ap...@googlegroups.com
I just responded to this in the thread in GWC at https://connect.googleforwork.com/ideas/5802.  (Copied below for convenience.)

Hope that helps!

Ian

The "fields" option of the GAM "report users" command takes the following options:

 

email
date
accounts:admin_set_name
accounts:is_disabled
accounts:disabled_reason
accounts:drive_used_quota_in_mb
accounts:first_name
accounts:gmail_used_quota_in_mb
accounts:gplus_photos_used_quota_in_mb
accounts:is_2sv_enforced
accounts:is_2sv_enrolled
accounts:is_delegated_admin
accounts:is_less_secure_apps_access_allowed
accounts:is_super_admin
accounts:is_suspended
accounts:last_name
accounts:num_authorized_apps
accounts:num_roles_assigned
accounts:num_security_keys
accounts:creation_time
accounts:last_login_time
accounts:last_sso_time
accounts:total_quota_in_mb
accounts:used_quota_in_mb
accounts:used_quota_in_percentage
accounts:user_has_overridden_name
docs:num_owned_google_documents_created
docs:num_owned_google_documents_edited
docs:num_owned_google_documents_trashed
docs:num_owned_google_documents_viewed
docs:num_owned_google_drawings_created
docs:num_owned_google_drawings_edited
docs:num_owned_google_drawings_trashed
docs:num_owned_google_drawings_viewed
docs:num_owned_google_forms_created
docs:num_owned_google_forms_edited
docs:num_owned_google_forms_trashed
docs:num_owned_google_forms_viewed
docs:num_owned_google_presentations_created
docs:num_owned_google_presentations_edited
docs:num_owned_google_presentations_trashed
docs:num_owned_google_presentations_viewed
docs:num_owned_google_spreadsheets_created
docs:num_owned_google_spreadsheets_edited
docs:num_owned_google_spreadsheets_trashed
docs:num_owned_google_spreadsheets_viewed
docs:num_owned_items_created
docs:num_owned_items_edited
docs:num_owned_items_trashed
docs:num_owned_items_viewed
docs:num_owned_other_types_created
docs:num_owned_other_types_edited
docs:num_owned_other_types_trashed
docs:num_owned_other_types_viewed
gmail:is_gmail_enabled
gmail:num_emails_exchanged
gmail:num_emails_received
gmail:num_emails_sent
gmail:num_spam_emails_received
gmail:last_access_time
gmail:last_imap_time
gmail:last_interaction_time
gmail:last_pop_time
gmail:last_webmail_time

 

So, for my test domain, if I want to see the amount of Gmail, Drive and total quota used for all the users, I'd run the command:

 

gam report users fields 'accounts:gmail_used_quota_in_mb,accounts:drive_used_quota_in_mb,accounts:used_quota_in_mb'
And I'd get the following results:

 

Got 9 users
email,date,accounts:drive_used_quota_in_mb,accounts:gmail_used_quota_in_mb,accounts:used_quota_in_mb
ic...@xxxxxx.berkeley.edu,2016-08-19,0,0,0

 

(Like I said, it's a test domain, so there's not much usage.)

 

So, if I combine* the results of that report with the output of the "print users" command to list all the folks in an ou (the "foo" ou in this example):
gam print users  query 'orgUnitPath=/foo'

 

I can get the results you were looking for.

 

And by "combine" I mean that you could combine those results in a number of different ways, including using the BulkOperations capability in GAM.  To do that, you'd generate the list of the users in the OU first, save those results to a CSV file, then the users output command, followed by the bulk command to GAM, would be:

 

gam print users  query 'orgUnitPath=/foo' > users_in_ou_foo.csv
gam csv users_in_ou_foo.csv gam report users user ~primaryEmail fields 'accounts:gmail_used_quota_in_mb,accounts:drive_used_quota_in_mb,accounts:used_quota_in_mb'  > quota_usage.csv

 

The results will then be in the quota_usage.csv file.  (You'll need to do a little manual cleanup of that file to remove the duplicated header lines, but that should be simple.)

 


--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" 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/6b41be82-a34c-4f29-a983-557c2f27fae8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

___
Ian Crew

IST-Architecture, Platforms and Integration (API)
Earl Warren Hall, Second Floor
University of California, Berkeley

已删除帖子

Srivastava, Harshit

未读,
2016年8月23日 05:09:252016/8/23
收件人 google-ap...@googlegroups.com

I used the below, but it returns an error.

In the command you mentioned, orgUnitPath-‘/youWant’. What can be the possible youWant parameter? The OU Id is correct as this is the name of the OU.

 

 

 

 

Regards

Harshit

+91-9620266233

 

From: google-ap...@googlegroups.com [mailto:google-ap...@googlegroups.com] On Behalf Of Erie
Sent: Tuesday, August 23, 2016 1:51 AM
To: Google Apps Manager <google-ap...@googlegroups.com>
Subject: [GAM] Re: Download OU specific List of users instead of the total users.

 

I just use this command, super easy:

 

gam print users allfields query orgUnitPath="/YourOU/YouWant" > OUList.csv

--

You received this message because you are subscribed to the Google Groups "Google Apps Manager" 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.

Srivastava, Harshit

未读,
2016年8月23日 05:28:392016/8/23
收件人 google-ap...@googlegroups.com

 

From: Srivastava, Harshit
Sent: Tuesday, August 23, 2016 2:39 PM
To: Google Apps Manager <google-ap...@googlegroups.com>
Subject: RE: [GAM] Re: Download OU specific List of users instead of the total users.

 

I used the below, but it returns an error.

In the command you mentioned, orgUnitPath-‘/youWant’. What can be the possible youWant parameter? The OU Id is correct as this is the name of the OU.

 

 

 

 

Regards

Harshit

+91-9620266233

 

From: google-ap...@googlegroups.com [mailto:google-ap...@googlegroups.com] On Behalf Of Erie
Sent: Tuesday, August 23, 2016 1:51 AM
To: Google Apps Manager <google-ap...@googlegroups.com>
Subject: [GAM] Re: Download OU specific List of users instead of the total users.

 

I just use this command, super easy:

gam print users allfields query orgUnitPath="/YourOU/YouWant" > OUList.csv

On Thursday, August 18, 2016 at 4:12:53 PM UTC-7, Harshit Srivastava wrote:

--

Ross Scroggs

未读,
2016年8月23日 08:05:082016/8/23
收件人 google-ap...@googlegroups.com
Harshit,

Beacuse your OU has spaces in the name, you need:
gam print users allfields query "orgUnitPath='/LDO Suspended'" > OUList.csv
Surround the query with ", surround the OU with '

On Aug 23, 2016, at 2:09 AM, Srivastava, Harshit <harshit.s...@intel.com> wrote:

In the command you mentioned, orgUnitPath-‘/youWant’. What can be the possible youWant parameter? The OU Id is correct as this is the name of the OU.
 
<image002.jpg>
回复全部
回复作者
转发
0 个新帖子