GAM Command

260 views
Skip to first unread message

Mark R

unread,
Sep 5, 2013, 9:41:21 AM9/5/13
to google-ap...@googlegroups.com
I am trying to use GAM to hide our students from the Global Address List. We have our students in different OU's. I am trying to run commands to first get the profile to verify there status and then I want to run a command to hide the OU from the Global Address List.
When I am running the commands the screen just sits at Getting all users in the Google Apps organization (may take some time on a large domain)...

gam ou /Schools/PG/Users/Students show profile
gam ou /Schools/PG/Users/Students profile unshared

Is my syntax correct or am I missing something in the command?

Jay Lee

unread,
Sep 5, 2013, 9:46:52 AM9/5/13
to google-ap...@googlegroups.com
Unfortunately with the new Admin SDK, there's no longer an API call to just retrieve all users under a single OU so GAM has to get ALL users in the instance and then filter down to users in the given OU. In large Google Apps instances, this takes a lot more time.

Until Admin SDK adds back a way to retrieve users based on OU, you may wish to use a Google Group instead. If all students were a member of a GG you could run:

gam group PG-Students profile unshared

also, I'm not sure what the point of reading the setting before changing it is? This is just going to cause additional API calls and slow things down...


Regards,

Jay Lee
Large Customer Deployment Lead   |  Dito


--
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 http://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/462b3b00-830b-4ab6-bac4-51c60ab7633c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Mark R

unread,
Sep 5, 2013, 11:59:37 AM9/5/13
to google-ap...@googlegroups.com
The reason I wanted to view the profile was to verify that I was getting the OU command properly.
Would the gam ou /Schools/PG/Users/Students profile unshared command work to change the profile?


On Thursday, September 5, 2013 8:46:52 AM UTC-5, Jay Lee wrote:
Unfortunately with the new Admin SDK, there's no longer an API call to just retrieve all users under a single OU so GAM has to get ALL users in the instance and then filter down to users in the given OU. In large Google Apps instances, this takes a lot more time.

Until Admin SDK adds back a way to retrieve users based on OU, you may wish to use a Google Group instead. If all students were a member of a GG you could run:

gam group PG-Students profile unshared

also, I'm not sure what the point of reading the setting before changing it is? This is just going to cause additional API calls and slow things down...


Regards,

Jay Lee
Large Customer Deployment Lead   |  Dito


On Thu, Sep 5, 2013 at 9:41 AM, Mark R <rad...@ccsd15.net> wrote:
I am trying to use GAM to hide our students from the Global Address List. We have our students in different OU's. I am trying to run commands to first get the profile to verify there status and then I want to run a command to hide the OU from the Global Address List.
When I am running the commands the screen just sits at Getting all users in the Google Apps organization (may take some time on a large domain)...

gam ou /Schools/PG/Users/Students show profile
gam ou /Schools/PG/Users/Students profile unshared

Is my syntax correct or am I missing something in the command?

--
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-manager+unsub...@googlegroups.com.

Jay Lee

unread,
Sep 5, 2013, 12:04:28 PM9/5/13
to google-ap...@googlegroups.com
Use:

gam print ous

to see the OU names as they should be used. 


Regards,

Jay Lee
Large Customer Deployment Lead   |  Dito


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 http://groups.google.com/group/google-apps-manager.

Mark R

unread,
Sep 5, 2013, 1:32:06 PM9/5/13
to google-ap...@googlegroups.com
When I run this command gam ou /Schools/PG/Users/Students profile unshared
I get this error message.
Getting all users in the Google Apps organization (may take some time on a large
 domain)...Traceback (most recent call last):
  File "gam.py", line 5949, in <module>
  File "gam.py", line 5490, in getUsersToModify
  File "gam.py", line 331, in callGAPI
  File "oauth2client\util.pyo", line 132, in positional_wrapper
  File "apiclient\http.pyo", line 716, in execute
  File "oauth2client\util.pyo", line 132, in positional_wrapper
  File "oauth2client\client.pyo", line 494, in new_request
  File "oauth2client\client.pyo", line 663, in _refresh
  File "oauth2client\client.pyo", line 682, in _do_refresh_request
  File "httplib2\__init__.pyo", line 1570, in request
  File "httplib2\__init__.pyo", line 1317, in _request
  File "httplib2\__init__.pyo", line 1286, in _conn_request
  File "httplib.pyo", line 1045, in getresponse
  File "httplib.pyo", line 409, in begin
  File "httplib.pyo", line 373, in _read_status
httplib.BadStatusLine: ''

Is this the right command that I should be running or is there so other issue going on?
Reply all
Reply to author
Forward
0 new messages