diff --git a/wiki/Aliases.md b/wiki/Aliases.md index 5b9b9950..86f780ad 100644 --- a/wiki/Aliases.md +++ b/wiki/Aliases.md @@ -103,7 +103,7 @@ gam print aliases [todrive *] [limittoou ]) [user|users ] [group|groups ] [select ] - [aliasmatchpattern ] + [issuspended ] [isarchived ] [aliasmatchpattern ] [shownoneditable] [nogroups] [nousers] [onerowpertarget] [delimiter ] [suppressnoaliasrows] @@ -117,6 +117,8 @@ By default, group and user aliases in all domains in the account are selected; t * `user|users ` - Print aliases for users in `` - Print aliases for users in `` * `group|groups ` - Print aliases for groups in `` - Limit users based on their status +* `isarchived ` - Limit users based on their status * `aliasmatchpattern ` - Print aliases that match a pattern * `nogroups` - Print only user aliases * `nousers` - Print only group aliases diff --git a/wiki/Basic-Items.md b/wiki/Basic-Items.md index 586cf6a8..60f926db 100644 --- a/wiki/Basic-Items.md +++ b/wiki/Basic-Items.md @@ -325,6 +325,8 @@ ::= draft|published|deleted ::= ::= + ::= + See: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes ::= allmail| abridged|daily| diff --git a/wiki/Bulk-Processing.md b/wiki/Bulk-Processing.md index d1a41d25..7a80527e 100644 --- a/wiki/Bulk-Processing.md +++ b/wiki/Bulk-Processing.md @@ -18,6 +18,9 @@ The variables `num_threads`, `num_tbatch_threads` and `auto_batch_min` in `gam.c * [Command data from Google Docs/Sheets/Storage](Command-Data-From-Google-Docs-Sheets-Storage) `gdoc ` and `gsheet ` + ::= + See: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes + ## Batch files There are two types of batch processing, one that uses processes and one that uses threads. Using processes is higher performance but `gam csv` commands are not supported. * `gam batch` - gam commands are run as processes, gam csv commands are not allowed in the batch file @@ -45,6 +48,9 @@ Batch files can contain the following types of lines: * sleep \ - Batch processing will suspend for \ seconds before the next command line is processed * To be effective, this should immediately follow commit-batch * print \ - Print \ on stderr +* datetime \ + * The current time is formatted with \ and subsequent lines will have `%datetime%` replaced with the formatted time value. + * See: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes * set \ \ * Subsequent lines will have %\% replaced with \ * clear \ diff --git a/wiki/Collections-of-Users.md b/wiki/Collections-of-Users.md index 151b8588..8a56a288 100644 --- a/wiki/Collections-of-Users.md +++ b/wiki/Collections-of-Users.md @@ -1,5 +1,6 @@ # Collections of Users - [Python Regular Expressions](Python-Regular-Expressions) Search function +- [Notes](#notes) - [Definitions](#definitions) - [User Type Entity](#user-type-entity) - [All non-suspended Users](#all-non-suspended-users) @@ -37,6 +38,37 @@ - [Examples using CSV files to print users from groups](#examples-using-CSV-files-to-print-users-from-groups) - [Examples using multiple queries](#examples-using-multiple-queries) +## Notes + +The followig items referencing non-archived/archived users were added to `` in version 7.22.00. +``` +all users_na +all users_arch +all users_na_ns +all users_arch_or_susp +domains_na +domains_arch +domains_na_ns +groups_na +groups_arch +groups_na_ns +group_users_na +group_users_arch +group_users_na_ns +ou_na +ou_arch +ou_na_ns +ou_and_children_na +ou_and_children_arch +ou_and_children_na_ns +ous_na +ous_arch +ous_na_ns +ous_and_children_na +ous_and_children_arch +ous_and_children_na_ns +``` + ## Definitions * [Basic Items](Basic-Items) @@ -90,25 +122,25 @@ ::= - (all users|users_ns|users_susp|users_ns_susp)| + (all users|users_na|users_arch|users_ns|users_susp|users_ns_susp|users_arch_or_susp|users_na_ns)| (user )| (users )| (oauthuser) - (domains|domains_ns|domains_susp )| - (group|group_ns|group_susp|group_inde )| - (groups|groups_ns|groups_susp|groups_inde )| + (domains|domains_na|domains_arch|domains_ns|domains_susp|domains_na_ns )| + (group|group_na|group_arch|group_ns|group_susp|group_na_ns|group_inde )| + (groups|groups_na|groups_arch|groups_ns|groups_susp|groups_na_ns|groups_inde )| (group_inde )|(groups_inde )| - (group_users|group_users_ns|group_users_susp + (group_users|group_users_na|group_users_arch|group_users_ns|group_users_susp|group_users_na_ns [members] [managers] [owners] [primarydomain] [domains ] [recursive|includederivedmembership] end)| (group_users_select [members] [managers] [owners] [notsuspended|suspended] [notarchived|archived] [primarydomain] [domains ] [recursive|includederivedmembership] end)| - (ou|ou_ns|ou_susp )| - (ou_and_children|ou_and_children_ns|ou_and_children_susp )| - (ous|ous_ns|ous_susp )| - (ous_and_children|ous_and_children_ns|ous_and_children_susp )| + (ou|ou_na|ou_arch|ou_ns|ou_susp|ou_na_ns )| + (ou_and_children|ou_and_children_na|ou_and_children_arch|ou_and_children_ns|ou_and_children_susp|ou_and_children_na_ns )| + (ous|ous_na|ous_arch|ous_ns|ous_susp|ous_na_ns )| + (ous_and_children|ous_and_children_na|ous_and_children_arch|ous_and_children_ns|ous_and_children_susp|ous_and_children_na_ns )| (courseparticipants )| (students )| (teachers )| @@ -126,41 +158,47 @@ (gdoc(:)+ )| (gcscsv(:)+ )| (gcsdoc(:)+ )) - [warnifnodata] [columndelimiter ] [noescapechar ][quotechar ] + [warnifnodata] [columndelimiter ] [noescapechar ] [quotechar ] [endcsv|(fields )] (matchfield|skipfield )* [delimiter ])| (datafile - users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|ous_susp| - ous_and_children|ous_and_children_ns|ous_and_children_susp| - courseparticipants|students|teachers + users| + groups|groups_na|groups_arch|groups_ns|groups_susp|groups_na_ns|groups_inde| + ous|ous_na|ous_arch|ous_ns|ous_susps|ous_na_ns| + ous_and_children|ous_and_children_na|ous_and_children_arch|ous_and_children_ns|ous_and_children_susp|ous_and_children_na_ns| + courseparticipants|students|teachers (( [charset ])| (gdoc )| (gcsdoc )) [delimiter ])| (csvdatafile - users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|ous_susp| - ous_and_children|ous_and_children_ns|ous_and_children_susp| - courseparticipants|students|teachers + users| + groups|groups_na|groups_arch|groups_ns|groups_susp|groups_na_ns|groups_inde| + ous|ous_na|ous_arch|ous_ns|ous_susps|ous_na_ns| + ous_and_children|ous_and_children_na|ous_and_children_arch|ous_and_children_ns|ous_and_children_susp|ous_and_children_na_ns| + courseparticipants|students|teachers (((:)+ [charset ] )| (gsheet(:)+ )| (gdoc(:)+ )| (gcscsv(:)+ )| (gcsdoc(:)+ )) - [warnifnodata] [columndelimiter ] [noescapechar ][quotechar ] + [warnifnodata] [columndelimiter ] [noescapechar ] [quotechar ] [endcsv|(fields )] (matchfield|skipfield )* [delimiter ])| (csvkmd - users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|ous_susp| - ous_and_children|ous_and_children_ns|ous_and_children_susp| - courseparticipants|students|teachers + users| + groups|groups_na|groups_arch|groups_ns|groups_susp|groups_na_ns|groups_inde| + ous|ous_na|ous_arch|ous_ns|ous_susps|ous_na_ns| + ous_and_children|ous_and_children_na|ous_and_children_arch|ous_and_children_ns|ous_and_children_susp|ous_and_children_na_ns| + courseparticipants|students|teachers ((| (gsheet )| (gdoc )| (gcscsv )| (gcsdoc )) - [charset ] [columndelimiter ] [noescapechar ][quotechar ] [fields ]) + [charset ] [columndelimiter ] [noescapechar ] [quotechar ] [fields ]) keyfield [keypattern ] [keyvalue ] [delimiter ] subkeyfield [keypattern ] [keyvalue ] [delimiter ] (matchfield|skipfield )* @@ -172,6 +210,12 @@ Use these options to select users for GAM commands. +## All non-archived Users +* `all users_na` + +## All archived Users +* `all users_arch` + ## All non-suspended Users * `all users` * `all users_ns` @@ -179,6 +223,12 @@ Use these options to select users for GAM commands. ## All suspended Users * `all users_susp` +## All archived or suspended Users +* `all users_arch_or_susp` + +## All non-archived and non-suspended Users +* `all users_na_ns` + ## All non-suspended and suspended Users * `all users_ns_susp` @@ -192,22 +242,31 @@ Use these options to select users for GAM commands. * `oauthuser` ## Users in the domains `` -* `domains|domains_ns|domains_susp ` +* `domains|domains_na|domains_arch|domains_ns|domains_susp|domains_na_ns ` * `domains` - All users + * `domains_na` - Non-archived users + * `domains_arch` - Archived users * `domains_ns` - Non-suspended users * `domains_susp` - Suspended users + * `domains_na_ns` - Non-archived and non-suspended users ## Users directly in the group `` -* `group|group_ns|group_susp ` +* `group|group_na|group_arch|group_ns|group_susp|group_na_ns ` * `group` - All user members + * `group_na` - Non-archived user members + * `group_arch` - Archived user members * `group_ns` - Non-suspended user members * `group_susp` - Suspended user members + * `group_na_ns` - Non-archived and non-suspended user members ## Users directly in the groups `` -* `groups|groups_ns|groups_susp ` +* `groups|groups_na|groups_arch|groups_ns|groups_susp|groups_na_ns ` * `groups` - All user members + * `groups_na` - Non-archived user members + * `groups_arch` - Archived user members * `groups_ns` - Non-suspended user members * `groups_susp` - Suspended user members + * `groups_na_ns` - Non-archived and non-suspended user members ## Users directly and indirectly in the group `` * `group_inde` - All user members including those from all subgroups @@ -216,10 +275,13 @@ Use these options to select users for GAM commands. * `groups_inde` - All user members including those from all subgroups ## Selected Users from groups -* `group_users|group_users_ns|group_users_susp [members] [managers] [owners] [primarydomain] [domains ] [recursive|includederivedmembership] end` +* `group_users|group_users_na|group_users_arch|group_users_ns|group_users_susp|group_users_na_ns [members] [managers] [owners] [primarydomain] [domains ] [recursive|includederivedmembership] end` * `group_users` - All user members + * `group_users_na` - Non-archived user members + * `group_users_arch` - Archived user members * `group_users_ns` - Non-suspended user members * `group_users_susp` - Suspended user members + * `group_users_na_ns` - Non-archived and non-suspended user members * `[members] [managers] [owners]` - The desired roles; if roles are not specified, all roles are included * `primarydomain` - Select Users from the primary domain * `domains ` - Select Users from the list of domains @@ -259,30 +321,41 @@ Use these options to select users for GAM commands. * `end` - Terminate the selection ## Users directly in the Organization Unit `` -* `ou|ou_ns|ou_susp ` +* `ou|ou_na|ou_arch|ou_ns|ou_susp|ou_na_ns ` * `ou` - All users - * `ou_ns` - Non-Suspended users + * `ou_na` - Non-archived users + * `ou_arch` - Archived users + * `ou_ns` - Non-suspended users * `ou_susp` - Suspended users + * `ou_na_ns` - Non-archived and nn-suspended users ## Users in the Organization Unit `` and all of its sub Organization Units -* `ou_and_children|ou_and_children_ns|ou_and_children_susp ` +* `ou_and_children|ou_and_children_na|ou_and_children_arch|ou_and_children_ns|ou_and_children_susp|ou_and_children_na_ns ` * `ou_and_children` - All users + * `ou_and_children_na` - Non-archived users + * `ou_and_children_arch` - Archived users * `ou_and_children_ns` - Non-suspended users * `ou_and_children_susp` - Suspended users + * `ou_and_children_na_ns` - Non-archived and nn-suspended users ## Users directly in the Organization Units `` -* `ous|ous_ns|ous_susp ` - Users directly in the Organization Units `` +* `ous|ous_na|ous_arch|ous_ns|ous_susp|ous_na_ns ` - Users directly in the Organization Units `` * `ous` - All users + * `ous_na` - Non-archived users + * `ous_arch` - Archived users * `ous_ns` - Non-suspended users * `ous_susp` - Suspended users + * `ous_na_ns` - Non-archived and nn-suspended users `` may require special quoting based on whether the OUs contain spaces, commas or single quotes. For quoting rules, see: [List Quoting Rules](Command-Line-Parsing) ## Users in the Organization Units `` and all of their sub Organization Units -* `ous_and_children|ous_and_children_ns|ous_and_children_susp ` - Users in the Organization Units `` and all of their sub Organization Units +* `ous_and_children|ous_and_children_na|ous_and_children_arch|ous_and_children_ns|ous_and_children_susp|ous_and_children_na_ns ` - Users in the Organization Units `` and all of their sub Organization Units * `ous_and_children` - All users + * `ous_and_children_na` - Non-archived users + * `ous_and_children_arch` - Archived users * `ous_and_children_ns` - Non-suspended users * `ous_and_children_susp` - Suspended users @@ -363,15 +436,21 @@ csvfile ## Users from groups/OUs/courses in a flat file/Google Doc/Google Cloud Storage Object ``` datafile - users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|ous_susp| - ous_and_children|ous_and_children_ns|ous_and_children_susp| - courseparticipants|students|teachers + users| + groups|groups_na|groups_arch|groups_ns|groups_susp|groups_na_ns|groups_inde| + ous|ous_na|ous_arch|ous_ns|ous_susp|ous_na_ns| + ous_and_children|ous_and_children_na|ous_and_children_arch|ous_and_children_ns|ous_and_children_susp|ous_and_children_na_ns| + courseparticipants|students|teachers (( [charset ])| (gdoc )| (gcsdoc )) [delimiter ] ``` -* `users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|ous_susp|ous_and_children|ous_and_children_ns|ous_and_children_susp|courseparticipants|students|teachers` - The type of item in the file +* `users|` + * `groups|groups_na|groups_arch|groups_ns_|groups_susp|groups_na_ns|groups_inde|` + * `ous|ous_na|ous_arch|ous_ns|ous_susp|ous_na_ns|` + * `ous_and_children|ous_and_children_na|ous_and_children_arch|ous_and_children_ns|ous_and_children_susp|ous_and_children_na_ns|` + * `courseparticipants|students|teachers` - The type of item in the file * `` - A flat file containing rows of the type of item specified * `charset ` - The character aset of the file if it isn't UTF-8 * `gdoc ` - A Google Doc containing rows of the type of item specified @@ -381,9 +460,11 @@ datafile ## Users from groups/OUs/courses in a CSV file/Google Sheet/Google Doc/Google Cloud Storage Object ``` csvdatafile - users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|ous_susp| - ous_and_children|ous_and_children_ns|ous_and_children_susp| - courseparticipants|students|teachers + users| + groups|groups_na|groups_arch|groups_ns|groups_susp|groups_na_ns|groups_inde| + ous|ous_na|ous_arch|ous_ns|ous_susp|ous_na_ns| + ous_and_children|ous_and_children_na|ous_and_children_arch|ous_and_children_ns|ous_and_children_susp|ous_and_children_na_ns| + courseparticipants|students|teachers (((:)+ [charset ] )| (gsheet(:)+ )| (gdoc(:)+ )| @@ -394,9 +475,13 @@ csvdatafile (matchfield|skipfield )* [delimiter ] ``` -* `users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|ous_susp|ous_and_children|ous_and_children_ns|ous_and_children_susp|courseparticipants|students|teachers` - The type of item in the file +* `users|` + * `groups|groups_na|groups_arch|groups_ns_|groups_susp|groups_na_ns|groups_inde|` + * `ous|ous_na|ous_arch|ous_ns|ous_susp|ous_na_ns|` + * `ous_and_children|ous_and_children_na|ous_and_children_arch|ous_and_children_ns|ous_and_children_susp|ous_and_children_na_ns|` + * `courseparticipants|students|teachers` - The type of item in the file * `(:)+` - A CSV file and the one or more columns contain the type of item specified - * `charset ` - The character aset of the file if it isn't UTF-8 + * `charset ` - The character set of the file if it isn't UTF-8 * `gsheet(:)+ ` - A Google Sheet and the one or more columns contain the type of item specified * `gdoc(:)+ ` - A Google Doc and the one or more columns contain the type of item specified * `gcscsv(:)+ ` - A Google Cloud Storage Bucket Object and the one or more columns contain the type of item specified @@ -413,9 +498,11 @@ csvdatafile ## Users directly in or from groups/OUs/courses in a CSV file/Google Sheet/Google Doc/Google Cloud Storage Object ``` csvkmd - users|groups|groups_ns|groups_susp|groups_inde|ous|ous_ns|ous_susp| - ous_and_children|ous_and_children_ns|ous_and_children_susp| - courseparticipants|students|teachers + users| + groups|groups_na|groups_arch|groups_ns|groups_susp|groups_na_ns|groups_inde| + ous|ous_na|ous_arch|ous_ns|ous_susp|ous_na_ns| + ous_and_children|ous_and_children_na|ous_and_children_arch|ous_and_children_ns|ous_and_children_susp|ous_and_children_na_ns| + courseparticipants|students|teachers ((| (gsheet )| (gdoc )| @@ -427,9 +514,13 @@ csvkmd (matchfield|skipfield )* [datafield (:)* [delimiter ]] ``` -* `users|groups|groups_ns_|groups_susp|groups_inde|ous|ous_ns|ous_susp|ous_and_children|ous_and_children_ns|ous_and_children_susp|courseparticipants|students|teachers` - The type of item in the file +* `users|` + * `groups|groups_na|groups_arch|groups_ns_|groups_susp|groups_na_ns|groups_inde|` + * `ous|ous_na|ous_arch|ous_ns|ous_susp|ous_na_ns|` + * `ous_and_children|ous_and_children_na|ous_and_children_arch|ous_and_children_ns|ous_and_children_susp|ous_and_children_na_ns|` + * `courseparticipants|students|teachers` - The type of item in the file * `` - A CSV file containing rows with columns of the type of item specified - * `charset ` - The character aset of the file if it isn't UTF-8 + * `charset ` - The character set of the file if it isn't UTF-8 * `gsheet ` - A Google Sheet containing rows with columns of the type of item specified * `gdoc ` - A Google Doc containing rows with columns of the type of item specified * `gcscsv ` - A Google Cloud Storage Bucket Object with columns of the type of item specified diff --git a/wiki/GamUpdates.md b/wiki/GamUpdates.md index 9f2cd0fe..477616cf 100644 --- a/wiki/GamUpdates.md +++ b/wiki/GamUpdates.md @@ -10,6 +10,24 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation +### 7.22.00 + +Expanded `` to allow specification of non-archived/archived users. + * See [Collections of Users](Collections-of-Users) + +These commands have also been updated to deal with archived users: + * `gam print aliases` + * `gam update groups` + * `gam info orgs` + * `gam print orgs` + * `gam print users` + +Added `datetime ` command that can be embedded in Gam batch files. +The current time is formatted with `` and subsequent lines in `` +will have `%datetime%` replaced with the formatted time value. + +See: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes + ### 7.21.03 Added option `notifyrecoveryemail` to `gam create user` and `gam update user password ` @@ -1917,7 +1935,7 @@ number of domain aliasess on stdout; no CSV file is written. Added option `showitemcountonly` to `gam print domains` that causes GAM to display the number of domains on stdout; no CSV file is written. - + ### 6.77.16 Fixed bug in `gam print filelist` that caused a trap. @@ -2681,7 +2699,7 @@ Batch processing will suspend for `` seconds before the next command li Added the following options to `` that allow more powerful matching. ``` -nottype +nottype typelist nottypelist rolelist @@ -3333,7 +3351,7 @@ Added support for Google Workspace Labs license. ### 6.64.10 -Fixed bug introduced in 6.64.09 that caused a trap when `gam redirect csv multiprocess` was used. +Fixed bug introduced in 6.64.09 that caused a trap when `gam redirect csv multiprocess` was used. ### 6.64.09 diff --git a/wiki/Groups-Membership.md b/wiki/Groups-Membership.md index 0344497a..3b55fa4b 100644 --- a/wiki/Groups-Membership.md +++ b/wiki/Groups-Membership.md @@ -92,6 +92,38 @@ See [Collections of Items](Collections-of-Items) Group membership commands involve specifying collections of users; for ``, see: [Collections of Users](Collections-of-Users) +### Select users based on archived state +When adding, deleting or synchronizing group members, to select only archived or non-archived users, use the following``: +``` + (all users_na|users_arch)| + (domains_na|domains_arch )| + (group_na|group_arch )| + (groups_na|groups_arch )| + (group_users_na|group_users_arch + [members] [managers] [owners] + [primarydomain] [domains ] [recursive|includederivedmembership] end)| + (ou_na|ou_arch )| + (ou_and_children_na|ou_and_children_arch )| + (ous_na|ous_arch )| + (ous_and_children_na|ous_and_children_arch ) +``` + +When adding, deleting or synchronizing group members, the `notarchived|archived` option can be used to select +users in a particular archived state. This option can be used with the following ``: +``` + (all users)| + (domains )| + (group )| + (groups )| + (group_users + [members] [managers] [owners] + [primarydomain] [domains ] [recursive|includederivedmembership] end)| + (ou )| + (ou_and_children )| + (ous )| + (ous_and_children ) +``` + ### Select users based on suspension state When adding, deleting or synchronizing group members, to select only suspended or non-suspended users, use the following``: ``` @@ -124,25 +156,6 @@ users in a particular suspension state. This option can be used with the followi (ous_and_children ) ``` -### Select users based on archived state -When adding, deleting or synchronizing group members, the `notarchived|archived` option can be used to select -users in a particular archived state. This option can be used with the following ``: -``` - (all users|users_ns|users_susp|users_ns_susp)| - (domains|domains_ns|domains_susp )| - (group|group_ns|group_susp )| - (groups|groups_ns|groups_susp )| - (group_users|group_users_ns|group_users_susp - [members] [managers] [owners] - [primarydomain] [domains ] [recursive|includederivedmembership] end)| - (ou|ou_ns|ou_susp )| - (ou_and_children|ou_and_children_ns|ou_and_children_susp )| - (ous|ous_ns|ous_susp )| - (ous_and_children|ous_and_children_ns|ous_and_children_susp )| - (query )| - (queries ) -``` - ## Add members to a group ``` gam update group|groups create|add [] @@ -275,6 +288,11 @@ For `notarchived|archived`, see: [Select users based on archived state](#select- The `notsuspended|suspended` and `notarchived|archived` not only control what users are selected from `` but they also control what users are selected from ``. +* `notsuspended` - Select only non-suspended members +* `suspended` - Select only suspended members +* `notarchived` - Select only non-archived members +* `archived` - Select only archived users +* `notsuspended notarchived` - Select non-suspended and non-archived members The `remove_domain_nostatus_members` option is used to remove members from the group that are in your domain but have no status. These members were added to the group before the user or group that they represent was created. @@ -373,10 +391,7 @@ By default, when clearing members from a group, all members, whether suspended/a * `suspended` - Clear only suspended members * `notarchived` - Clear only non-archived members * `archived` - Clear only archived users -* `notsuspended notarchived` - Do not clear suspended and archived members -* `suspended archived` - Clear suspended and archived members -* `notsuspended archived` - Do not clear archived members -* `suspended notarchived` - Do not clear suspended members +* `notsuspended notarchived` - Clear non-suspended and non-archived members Members that have met the above qualifications to be cleared can be further qualifed by their email address. * `emailclearpattern ` - Members with email addresses that match `` will be cleared; others will be retained @@ -417,19 +432,12 @@ When `` specifies a group or groups: * `usersonly` - Only the user members from the specified groups are added * `groupsonly` - Only the group members from the specified groups are added -By default, when updating members from organization units, all users, whether suspended or not, are included. -* `notsuspended` - Do not include suspended users -* `suspended` - Only include suspended users - -By default, when updating members from groups, all users, whether suspended/archived or not, are included. -* `notsuspended` - Do not include suspended users -* `suspended` - Only include suspended users -* `notarchived` - Do not include archived users -* `archived` - Only include archived users -* `notsuspended notarchived` - Do not include suspended and archived users -* `suspended archived` - Include only suspended or archived users -* `notsuspended archived` - Only include archived users -* `suspended notarchived` - Only include suspended users +By default, when updating members from groups/organization units, all users, whether suspended/archived or not, are included. +* `notsuspended` - Update only non-suspended members +* `suspended` - Update only suspended members +* `notarchived` - Update only non-archived members +* `archived` - Update only archived users +* `notsuspended notarchived` - Update non-suspended and non-archived members You can set the `delivery` option for the updated members: * `allmail` - All messages, delivered as soon as they arrive diff --git a/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md b/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md index 5deec3ba..883153a0 100644 --- a/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md +++ b/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md @@ -252,7 +252,7 @@ writes the credentials into the file oauth2.txt. admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt admin@server:/Users/admin$ gam version WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found -GAM 7.21.03 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.22.00 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.13.7 64-bit final MacOS Sequoia 15.6.1 x86_64 @@ -990,7 +990,7 @@ writes the credentials into the file oauth2.txt. C:\>del C:\GAMConfig\oauth2.txt C:\>gam version WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found -GAM 7.21.03 - https://github.com/GAM-team/GAM - pythonsource +GAM 7.22.00 - https://github.com/GAM-team/GAM - pythonsource GAM Team Python 3.13.7 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/wiki/Organizational-Units.md b/wiki/Organizational-Units.md index 8e921090..6b943b08 100644 --- a/wiki/Organizational-Units.md +++ b/wiki/Organizational-Units.md @@ -187,11 +187,15 @@ given if invalid CrOS deviceIds are specified. ## Display organizational units These commands display information as an indented list of keys and values. ``` -gam info org|ou [nousers|notsuspended|suspended] [children|child] -gam info orgs|ous [nousers|notsuspended|suspended] [children|child] +gam info org|ou [nousers|notarchived|archived|notsuspended|suspended] [children|child] + [nousers | ([notarchived|archived] [notsuspended|suspended])] [children|child] +gam info orgs|ous [nousers|notarchived|archived|notsuspended|suspended] [children|child] + [nousers | ([notarchived|archived] [notsuspended|suspended])] [children|child] ``` By default, all users of the org units are displayed: * `nousers` - Don't display users of the org units +* `notarchived` - Display non-archived users of the org units +* `archived` - Display archived users of the org units * `notsuspended` - Display non-suspended users of the org units * `suspended` - Display suspended users of the org units * `children|child` - Display users in any child org unit @@ -214,7 +218,7 @@ By default, Gam prints all child org units of /. * `convertcrnl` - In the description field, convert carriage return to \r and new line to \n. Options `parentselector ` and `childselector ` add an additional column `orgUnitSelector` to the output. -This column value can be used in subsequent `gam csv` commands to appropriateley select members without duplication. +This column value can be used in subsequent `gam csv` commands to appropriately select members without duplication. By default, all OUs are displayed. You can limit the display of OUs to those where the number of ChromeOS devices/users falls within a range. Gathering this data requires additional API calls diff --git a/wiki/Todrive.md b/wiki/Todrive.md index 06c6407c..e3d35ae9 100644 --- a/wiki/Todrive.md +++ b/wiki/Todrive.md @@ -27,6 +27,8 @@ You can modify the default todrive behavior with options in `gam.cfg` or on the ## Definitions ``` + ::= + See: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes ::= ::= ::= @@ -194,11 +196,11 @@ direct the uploaded file to a particular user and location and add a timestamp t (tdreturnidonly [])| (tdshare commenter|reader|writer)*| (tdsheet (id:)|)| - (tdsheettimestamp [] [tdsheettimeformat ]) + (tdsheettimestamp [] [tdsheettimeformat ]) (tdsheettitle )| (tdsubject )| ([tdsheetdaysoffset ] [tdsheethoursoffset ])| - (tdtimestamp [] [tdtimeformat ] + (tdtimestamp [] [tdtimeformat ] ([tddaysoffset ] [tdhoursoffset ])| (tdtimezone )| (tdtitle )| diff --git a/wiki/Users-Drive-Files-Manage.md b/wiki/Users-Drive-Files-Manage.md index ae410d27..f2d54150 100644 --- a/wiki/Users-Drive-Files-Manage.md +++ b/wiki/Users-Drive-Files-Manage.md @@ -68,6 +68,8 @@ ::= | ``` ``` + ::= + See: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes ::= (.)+ ::= @ ::= @@ -178,7 +180,7 @@ gam create|add drivefile [(localfile |-)|(url )] [(drivefilename|newfilename ) | (replacefilename )*] [stripnameprefix ] [noduplicate] - [timestamp []] [timeformat ] + [timestamp []] [timeformat ] * [(csv [todrive *] (addcsvdata )*) | (returnidonly|returnlinkonly|returneditlinkonly|showdetails)] @@ -478,7 +480,7 @@ gam update drivefile [copy] [returnidonly|ret [(localfile |-)|(url )] [retainname | (newfilename ) | (replacefilename )*] [stripnameprefix ] - [timestamp []] [timeformat ] + [timestamp []] [timeformat ] * [(gsheet|csvsheet [clearfilter])|(addsheet )] [charset ] [columndelimiter ] diff --git a/wiki/Users.md b/wiki/Users.md index dab493f6..ab5a2e3e 100644 --- a/wiki/Users.md +++ b/wiki/Users.md @@ -1059,7 +1059,7 @@ gam print users [todrive *] [userview] [allfields|basic|full|(*|fields )] [delimiter ] [sortheaders []] [scalarsfirst []] [formatjson [quotechar ]] [quoteplusphonenumbers] - [issuspended ] [aliasmatchpattern ] + [issuspended ] [isarchived ] [aliasmatchpattern ] [showvalidcolumn] (addcsvdata )* ``` @@ -1070,6 +1070,7 @@ By default, users in all domains in the account are selected; these options allo * `limittoou |` - Limit users to those in the specified `>` * `deleted_only|only_deleted` - Only display deleted users * `issuspended ` - Limit users based on their status +* `isarchived ` - Limit users based on their status ### Print a header row and fields for users specified by `` ``` @@ -1084,7 +1085,7 @@ gam print users [todrive *] select [userview] [basic|full|allfields|(*|fields )] [delimiter ] [sortheaders []] [scalarsfirst []] [formatjson [quotechar ]] [quoteplusphonenumbers] - [issuspended ] [aliasmatchpattern ] + [issuspended ] [isarchived ] [aliasmatchpattern ] [showvalidcolumn] (addcsvdata )* gam print users [todrive *] @@ -1098,7 +1099,7 @@ gam print users [todrive *] [userview] [basic|full|allfields|(*|fields )] [delimiter ] [sortheaders []] [scalarsfirst []] [formatjson [quotechar ]] [quoteplusphonenumbers] - [issuspended ] [aliasmatchpattern ] + [issuspended ] [isarchived ] [aliasmatchpattern ] [showvalidcolumn] (addcsvdata )* ``` @@ -1189,7 +1190,7 @@ gam print users countonly [todrive *] ([domain|domains ] [(query )|(queries )] [limittoou ] [deleted_only|only_deleted]) [formatjson [quotechar ]] - [issuspended ] + [issuspended ] [isarchived ] ``` By default, users in all domains in the account are selected; these options allow selection of subsets of users: * `domain|domains ` - Limit users to those in the domains specified by `` @@ -1198,6 +1199,7 @@ By default, users in all domains in the account are selected; these options allo * `limittoou |` - Limit users to those in the specified `>` * `deleted_only|only_deleted` - Only display deleted users * `issuspended ` - Limit users based on their status +* `isarchived ` - Limit users based on their status ### Print domain counts for users specified by `` ``` @@ -1325,7 +1327,7 @@ gam print users select showitemcountonly gam print users ([domain|domains ] [(query )|(queries )] [limittoou ] [deleted_only|only_deleted])|[select ] - [issuspended ] + [issuspended ] [isarchived ] showitemcountonly ``` Example diff --git a/wiki/Version-and-Help.md b/wiki/Version-and-Help.md index 80cbe84f..59b2abac 100644 --- a/wiki/Version-and-Help.md +++ b/wiki/Version-and-Help.md @@ -3,7 +3,7 @@ Print the current version of Gam with details ``` gam version -GAM 7.21.03 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.22.00 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.13.7 64-bit final macOS Sequoia 15.7 x86_64 @@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00 Print the current version of Gam with details and time offset information ``` gam version timeoffset -GAM 7.21.03 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.22.00 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.13.7 64-bit final macOS Sequoia 15.7 x86_64 @@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second Print the current version of Gam with extended details and SSL information ``` gam version extended -GAM 7.21.03 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.22.00 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.13.7 64-bit final macOS Sequoia 15.7 x86_64 @@ -68,7 +68,7 @@ MacOS High Sierra 10.13.6 x86_64 Path: /Users/Admin/bin/gam7 Version Check: Current: 5.35.08 - Latest: 7.21.03 + Latest: 7.22.00 echo $? 1 ``` @@ -76,7 +76,7 @@ echo $? Print the current version number without details ``` gam version simple -7.21.03 +7.22.00 ``` In Linux/MacOS you can do: ``` @@ -86,7 +86,7 @@ echo $VER Print the current version of Gam and address of this Wiki ``` gam help -GAM 7.21.03 - https://github.com/GAM-team/GAM +GAM 7.22.00 - https://github.com/GAM-team/GAM GAM Team Python 3.13.7 64-bit final macOS Sequoia 15.7 x86_64