Enhanced gam create|print|show chromeprofilecommand

This commit is contained in:
Ross Scroggs
2025-07-12 20:59:47 -07:00
parent 0dd8e099c5
commit 19408f8f4c
10 changed files with 81 additions and 24 deletions

View File

@@ -284,6 +284,9 @@
<ChatMessage> ::= spaces/<String>/messages/<String>
<ChatSpace> ::= spaces/<String> | space <String> | space spaces/<String>
<ChatThread> ::= spaces/<String>/threads/<String>
<ChromeProfilePermanentID> ::= <String>
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
<ChromeProfileCommandName> ::= <ChomeProfileName>/commands/<String>
<GIGroupAlias> ::= <EmailAddress>
<GIGroupItem> ::= <EmailAddress>|<UniqueID>|groups/<String>
<CIGroupMemberType> ::= cbcmbrowser|chromeosdevice|customer|group|other|serviceaccount|user

View File

@@ -5,6 +5,7 @@
- [Delete Chrome Profiles](#delete-chrome-profiles)
- [Display Chrome Profiles](#display-chrome-profiles)
- [Profile Query Searchable Fields](#profile-query-searchable-fields)
- [Collections of Chrome Profile names for commands](#collections-of-chrome-profile-names-for-commands)
- [Create a Chrome Profile command](#create-a-chrome-profile-command)
- [Display Chrome Profile commands](#display-chrome-profile-commands)
@@ -27,11 +28,18 @@ Follow instructions at: Turn on managed profile reporting
* [Turn on Chrome Browser and Profile Reporting](https://support.google.com/chrome/a/answer/9301421)
## Definitions
* [`<FileSelector> | <CSVFileSelector>`](Collections-of-Items)
```
<CustomerID> ::= <String>
<ChromeProfilePermanentID> ::= <String>
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
<ChromeProfileCommandName> ::= <ChomeProfileName>/commands/<String>
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
<ChromeProfileNameEntity> ::=
<ChromeProfileNameList> |
(select <FileSelector>|<CSVFileSelector>) |
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]])
<ChromeProfileFieldName> ::=
affiliationstate|
@@ -97,7 +105,7 @@ By default, Gam displays the information as an indented list of keys and values:
```
gam show chromeprofiles
[filtertime.* <Time>] [filter <String>]
[filter <String> (filtertime<String> <Time>)*]
[orderby <ChromeProfileOrderByFieldName> [ascending|descending]]
<ChromeProfileFieldName>* [fields <ChromeProfileFieldNameList>]
[formatjson]
@@ -110,7 +118,7 @@ Select the fields to be displayed:
* `<ChromeProfileFieldName>* [fields <ChromeProfileFieldNameList>]` - Display a selected list of fields
Use the `filtertime<String> <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
The `filtertime<String> <Time>` value replaces the string `#fiktertime<String>#` in the `filter <String>`.
The `filtertime<String> <Time>` value replaces the string `#filtertime<String>#` in the `filter <String>`.
The characters following `filtertime` can be any combination of lowercase letters and numbers.
By default, Gam displays the information as an indented list of keys and values:
@@ -118,7 +126,7 @@ By default, Gam displays the information as an indented list of keys and values:
```
gam print chromeprofiles [todrive <ToDriveAttribute>*]
[filtertime.* <Time>] [filter <String>]
[filter <String> (filtertime<String> <Time>)*]
[orderby <ChromeProfileOrderByFieldName> [ascending|descending]]
<ChromeProfileFieldName>* [fields <ChromeProfileFieldNameList>]
[formatjson [quotechar <Character>]]
@@ -197,14 +205,30 @@ Print information about Chrome profiles on Windows.
```
gam print chromeprofiles filter "osPlatformType=WINDOWS"
```
## Collections of Chrome Profile names for commands
```
<ChromeProfileNameEntity> ::=
<ChromeProfileNameList> |
(select <FileSelector>|<CSVFileSelector>) |
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]])
```
* `<ChromeProfileNameList>` - List of Chrome profile names
* `select <FileSelector>|<CSVFileSelector>` - A flat or CSV file containing Chrome profile names
* `filter <String> (filtertime<String> <Time>)*` - A filter to select Chrome profiles
Use the `filtertime<String> <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
The `filtertime<String> <Time>` value replaces the string `#filtertime<String>#` in the `filter <String>`.
The characters following `filtertime` can be any combination of lowercase letters and numbers.
## Create a Chrome Profile command
Clear a Chrome Browser profile cache and/or cookies.
```
gam create chromeprofilecommand <ChromeProfileName>
gam create chromeprofilecommand <ChromeProfileNameEntity>
[clearcache [<Boolean>]] [clearcookies [<Boolean>]]
[formatjson]
```
## Display Chrome Profile commands
Display the status of a specific Chrome Browser profile command.
```
gam info chromeprofilecommand <ChromeProfileCommandName>
[formatjson]
@@ -212,15 +236,16 @@ gam info chromeprofilecommand <ChromeProfileCommandName>
By default, Gam displays the information as an indented list of keys and values:
* `formatjson` - Display the fields in JSON format.
Display the status of selected Chrome Browser profile commands.
```
gam show chromeprofilecommands <ChromeProfileName>
gam show chromeprofilecommands <ChromeProfileNameEntity>
[formatjson]
```
By default, Gam displays the information as an indented list of keys and values:
* `formatjson` - Display the fields in JSON format.
```
gam print chromeprofilecommands <ChromeProfileName> [todrive <ToDriveAttribute>*]
gam print chromeprofilecommands <ChromeProfileNameEntity> [todrive <ToDriveAttribute>*]
[formatjson [quotechar <Character>]]
```
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format:

View File

@@ -144,6 +144,10 @@ Data fields identified in a `csvkmd` argument.
<CalendarACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
<CalendarEntity> ::=
<CalendarList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
<ChromeProfileNameEntity> ::=
<ChromeProfileNameList> |
(select <FileSelector>|<CSVFileSelector>) |
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]])
<CIPolicyNameEntity> ::=
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
<ClassificationLabelNameEntity> ::=
@@ -206,6 +210,7 @@ Data fields identified in a `csvkmd` argument.
all_shortcuts |
all_3p_shortcuts |
all_items |
my_commentable_items |
my_docs |
my_files |
my_folders |
@@ -231,6 +236,7 @@ Data fields identified in a `csvkmd` argument.
others_3p_shortcuts |
others_items |
writable_files
<DriveFileEntityShortcut> ::=
alldrives |
mydrive_any |
@@ -246,6 +252,7 @@ Data fields identified in a `csvkmd` argument.
sharedwithme_all |
sharedwithme_mydrive |
sharedwithme_notmydrive
<DriveFileEntity> ::=
<DriveFileIDEntity> |
<DriveFileNameEntity> |

View File

@@ -10,6 +10,23 @@ 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.13.01
Enhanced `gam create|print|show chromeprofilecommand` to allow specification
of multiple Chrome browser profiles rather than just one.
```
<ChromeProfilePermanentID> ::= <String>
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
<ChromeProfileNameEntity> ::=
<ChromeProfileNameEntity> ::=
<ChromeProfileNameList> |
(select <FileSelector>|<CSVFileSelector>) |
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]])
gam create|print_show chromeprofilecommand <ChromeProfileNameEntity>
```
### 7.13.00
Added commands that send remote commands to Chrome browser profiles and display the results;

View File

@@ -251,7 +251,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.13.00 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.13.01 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64
@@ -989,7 +989,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.13.00 - https://github.com/GAM-team/GAM - pythonsource
GAM 7.13.01 - https://github.com/GAM-team/GAM - pythonsource
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
Windows-10-10.0.17134 AMD64

View File

@@ -11,6 +11,7 @@
<CalendarACLScopeList> ::= "<CalendarACLScope>(,<CalendarACLScope>)*"
<CalendarList> ::= "<CalendarItem>(,<CalendarItem>)*"
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
<CIGroupAliasList> ::= "<CIGroupAlias>(,<CIGroupAlias>)*"
<CIGroupMemberTypeList> ::= "<CIGroupMemberType>(,<CIGroupMemberType>)*"
<CIPolicyNameList> ::= "<CIPolicyName>(,<CIPolicyName>)*"

View File

@@ -68,7 +68,7 @@ gam report <ActivityApplicationName> [todrive <ToDriveAttribute>*]
[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath> [showorgunit])|(select <UserTypeEntity>)]
[([start <Time>] [end <Time>])|(range <Time> <Time>)|
yesterday|today|thismonth|(previousmonths <Integer>)]
[filtertime<String> <Time>] [filter|filters <String>]
[filter <String> (filtertime<String> <Time>)*]
[event|events <EventNameList>] [ip <String>]
[groupidfilter <String>]
[maxactivities <Number>] [maxevents <Number>] [maxresults <Number>]
@@ -363,7 +363,7 @@ gam report users|user [todrive <ToDriveAttribute>*]
[(date <Date>)|(range <Date> <Date>)|
yesterday|today|thismonth|(previousmonths <Integer>)]
[(nodatechange | limitdatechanges <Integer>) | (fulldatarequired all|<UserServiceNameList>)]
[filtertime<String> <Time>] [filter|filters <String>]
[filter <String> (filtertime<String> <Time>)*]
[(fields|parameters <String>)|(services <UserServiceNameList>)]
[aggregatebydate|aggregatebyuser [Boolean]]
[maxresults <Number>]
@@ -413,7 +413,7 @@ where you can specify a relative date without having to change the script.
For example, filter for last logins more that 60 days ago.
```
filtertime60d -60d filters "accounts:last_login_time<#filtertime60d#"
filters "accounts:last_login_time<#filtertime60d#" filtertime60d -60d
```
Select the fields/parameters to display.

View File

@@ -45,6 +45,8 @@
* [Shared Drives Search](https://developers.google.com/drive/api/guides/search-shareddrives)
## Definitions
* [`<FileSelector> | <CSVFileSelector>`](Collections-of-Items)
```
<ColorHex> ::= "#<Hex><Hex><Hex><Hex><Hex><Hex>"
<ColorNameGoogle> ::=

View File

@@ -290,7 +290,7 @@ Select forms with `<DriveFileEntity>`:
* `my_forms` - Display responses for all forms owned by the user
```
gam <UserTypeEntity> show formresponses <DriveFileEntity>
[filtertime.* <Time>] [filter <String>]
[filter <String> (filtertime<String> <Time>)*]
[countsonly|formatjson]
```
By default, GAM displays form response details, use the `countsonly` option to get the number of responses but no response details.
@@ -302,11 +302,12 @@ By default, GAM displays all form responses, you can filter by response time:
For example, to get the form responses submitted since the beginning of the year:
* `filter timestamp >= 2022-01-01T00:00:00Z`
Use the `filtertime.* <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
Use the `filtertime<String <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
The `filtertime<String> <Time>` value replaces the string `#filtertime<String>#` in any filters..
The characters following `filtertime` can be any combination of lowercase letters and numbers.
For example, to get the responses subnitted in the last four hours:
* `filtertime4h -4h filter "timestamp >= #filtertime4h#`
For example, to get the responses submitted in the last four hours:
* `filter "timestamp >= #filtertime4h#" filtertime4h -4h`
By default, Gam displays the information as an indented list of keys and values.
* `formatjson` - Display the form response in JSON format
@@ -314,7 +315,7 @@ By default, Gam displays the information as an indented list of keys and values.
```
gam <UserTypeEntity> print formresponses <DriveFileEntity> [todrive <ToDriveAttribute>*]
(addcsvdata <FieldName> <String>)*
[filtertime.* <Time>] [filter <String>]
[filter <String> (filtertime<String> <Time>)*]
[countsonly|(formatjson [quotechar <Character>])]
```
By default, GAM displays form response details, use the `countsonly` option to get the number of responses but no response details.
@@ -328,11 +329,12 @@ By default, GAM displays all form responses, you can filter by response time:
For example, to get the form responses submitted since the beginning of the year:
* `filter timestamp >= 2022-01-01T00:00:00Z`
Use the `filtertime.* <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
Use the `filtertime<String> <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
The `filtertime<String> <Time>` value replaces the string `#filtertime<String>#` in any filters..
The characters following `filtertime` can be any combination of lowercase letters and numbers.
For example, to get the responses subnitted in the last four hours:
* `filtertime4h -4h filter "timestamp >= #filtertime4h#`
* `filter "timestamp >= #filtertime4h#" filtertime4h -4h`
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details
```
gam version
GAM 7.13.00 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.13.01 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
MacOS Sequoia 15.5 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.13.00 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.13.01 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
MacOS Sequoia 15.5 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.13.00 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.13.01 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
Path: /Users/Admin/bin/gam7
Version Check:
Current: 5.35.08
Latest: 7.13.00
Latest: 7.13.01
echo $?
1
```
@@ -72,7 +72,7 @@ echo $?
Print the current version number without details
```
gam version simple
7.13.00
7.13.01
```
In Linux/MacOS you can do:
```
@@ -82,7 +82,7 @@ echo $VER
Print the current version of Gam and address of this Wiki
```
gam help
GAM 7.13.00 - https://github.com/GAM-team/GAM
GAM 7.13.01 - https://github.com/GAM-team/GAM
GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64