Update Windows CP showitemcountonly

This commit is contained in:
Ross Scroggs
2025-11-04 09:05:38 -08:00
parent 376c911e58
commit 56acae7c7d
20 changed files with 79 additions and 22 deletions

View File

@@ -711,7 +711,9 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print cros query "sync:..2020-01-01" showitemcountonly)
Windows PowerShell
count = & gam print cros query "sync:..2020-01-01" showitemcountonly
$count = & gam print cros query "sync:..2020-01-01" showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print cros query "sync:..2020-01-01" showitemcountonly') do set count=%a
```
## Print ChromeOS device activity

View File

@@ -514,7 +514,9 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print courses states active showitemcountonly)
Windows PowerShell
count = & gam print courses states active showitemcountonly
$count = & gam print courses states active showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print courses states active showitemcountonly') do set count=%a
```
## Display course announcements

View File

@@ -163,5 +163,7 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print course-participants teacher asmith states active show students showitemcountonly)
Windows PowerShell
count = & gam print course-participants teacher asmith states active show students showitemcountonly
$count = & gam print course-participants teacher asmith states active show students showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print course-participants teacher asmith states active show students showitemcountonly') do set count=%a
```

View File

@@ -269,5 +269,7 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print course-participants teacher asmith states active show students showitemcountonly)
Windows PowerShell
count = & gam print course-participants teacher asmith states active show students showitemcountonly
$count = & gam print course-participants teacher asmith states active show students showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print course-participants teacher asmith states active show students showitemcountonly') do set count=%a
```

View File

@@ -272,7 +272,9 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print devices queries "'model:Mac'" showitemcountonly)
Windows PowerShell
count = & gam print devices queries "'model:Mac'" showitemcountonly
$count = & gam print devices queries "'model:Mac'" showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print devices queries "'model:Mac'" showitemcountonly') do set count=%a
```
## Approve or block device users
@@ -363,7 +365,9 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print deviceusers queries "'model:Mac'" showitemcountonly)
Windows PowerShell
count = & gam print deviceusers queries "'model:Mac'" showitemcountonly
$count = & gam print deviceusers queries "'model:Mac'" showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print deviceusers queries "'model:Mac'" showitemcountonly') do set count=%a
```

View File

@@ -458,5 +458,7 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print cigroups showitemcountonly)
Windows PowerShell
count = & gam print cidgroups showitemcountonly
$count = & gam print cigroups showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print cigroups showitemcountonly') do set count=%a
```

View File

@@ -60,6 +60,15 @@ Display the number of domains.
gam print|show domains
showitemcountonly
```
To retrieve the count with `showitemcountonly`:
```
Linux/MacOS
count=$(gam print domains showitemcountonly)
Windows PowerShell
$count = & gam print domains showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print domains showitemcountonly') do set count=%a
```
## Create and delete domain aliases
```
@@ -94,3 +103,12 @@ Display the number of domain aliases.
gam print|show domainaliases|aliasdomains
showitemcountonly
```
To retrieve the count with `showitemcountonly`:
```
Linux/MacOS
count=$(gam print domainaliases showitemcountonly)
Windows PowerShell
$count = & gam print domainaliases showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print domainaliases showitemcountonly') do set count=%a
```

View File

@@ -680,5 +680,7 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print groups showitemcountonly)
Windows PowerShell
count = & gam print groups showitemcountonly
```
$count = & gam print groups showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print groups showitemcountonly') do set count=%a

View File

@@ -255,7 +255,7 @@ WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oa
GAM 7.28.00 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final
macOS Tahoe 26.0.1 x86_64
macOS Tahoe 26.1 x86_64
Path: /Users/admin/bin/gam7
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com

View File

@@ -173,5 +173,7 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print mobile showitemcountonly)
Windows PowerShell
count = & gam print mobile showitemcountonly
$count = & gam print mobile showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print mobile showitemcountonly') do set count=%a
```

View File

@@ -266,7 +266,9 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print orgs showitemcountonly)
Windows PowerShell
count = & gam print orgs showitemcountonly
$count = & gam print orgs showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print orgs showitemcountonly') do set count=%a
```
## Display indented organizational unit tree

View File

@@ -512,7 +512,9 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print resources showitemcountonly)
Windows PowerShell
count = & gam print resources showitemcountonly
$count = & gam print resources showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print resources showitemcountonly') do set count=%a
```
## Manage resource calendar ACLs

View File

@@ -537,7 +537,9 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print shareddrives showitemcountonly)
Windows PowerShell
count = & gam print shareddrives showitemcountonly
$count = & gam print shareddrives showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print shareddrives showitemcountonly') do set count=%a
```
## Display all Shared Drives with a specific organizer
@@ -590,7 +592,9 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print oushareddrives showitemcountonly)
Windows PowerShell
count = & gam print oushareddrives showitemcountonly
$count = & gam print oushareddrives showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print oushareddrives showitemcountonly') do set count=%a
```
## Manage Shared Drive access

View File

@@ -349,6 +349,8 @@ Linux/MacOS
fileId=$(gam user user@domain.com copy drivefile <DriveFileEntity> ... returnidonly)
Windows PowerShell
$fileId = & gam user user@domain.com copy drivefile <DriveFileEntity> ... returnidonly
Windows Command Prompt
for /f "delims=" %a in ('gam user user@domain.com copy drivefile <DriveFileEntity> ... returnidonly') do set fileId=%a
```
The file ID will only be valid when the return code of the command is 0; program accordingly.

View File

@@ -554,6 +554,8 @@ Linux/MacOS
fileId=$(gam user user@domain.com update drivefile <DriveFileEntity> copy ... returnidonly)
Windows PowerShell
$fileId = & gam user user@domain.com update drivefile <DriveFileEntity> copy ... returnidonly
Windows Command Prompt
for /f "delims=" %a in ('gam user user@domain.com update drivefile <DriveFileEntity> copy ... returnidonly') do set fileId=%a
```
The file ID will only be valid when the return code of the command is 0; program accordingly.

View File

@@ -72,6 +72,8 @@ Linux/MacOS
fileId=$(gam user user@domain.com create drivefileshortcut ... returnidonly)
Windows PowerShell
$fileId = & gam user user@domain.com create drivefileshortcut ... returnidonly
Windows Command Prompt
for /f "delims=" %a in ('gam user user@domain.com create drivefileshortcut ... returnidonly') do set fileId=%a
```
The shortcut ID will only be valid when the return code of the command is 0; program accordingly.

View File

@@ -283,6 +283,8 @@ Linux/MacOS
teamDriveId=$(gam user user@domain.com create shareddrive ... returnidonly)
Windows PowerShell
$teamDriveId = & gam user user@domain.com create shareddrive ... returnidonly
Windows Command Prompt
for /f "delims=" %a in ('gam user user@domain.com create shareddrive ... returnidonly') do set teamDriveId=%a
```
## Bulk Create Shared Drives
@@ -425,9 +427,11 @@ The `Getting` and `Got` messages are written to stderr, the count is writtem to
To retrieve the count with `showitemcountonly`:
```
Linux/MacOS
count=$(gam user user@domain.com print shareddrives showitemcountonly)
count=$(gam user user@domain.com print shareddrives ... showitemcountonly)
Windows PowerShell
count = & gam user user@domain.com print shareddrives showitemcountonly
$count = & gam user user@domain.com print shareddrives ... showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam user user@domain.com print shareddrives ... showitemcountonly') do set count=%a
```
## Display Shared Drive Organizers
The following command can be used instead of the `GetTeamDriveOrganizers.py` script.

View File

@@ -1339,7 +1339,9 @@ To retrieve the count with `showitemcountonly`:
Linux/MacOS
count=$(gam print users query "orgUnitPath='/Students/Middle School'" showitemcountonly)
Windows PowerShell
count = & gam print users query "orgUnitPath='/Students/Middle School'" showitemcountonly
$count = & gam print users query "orgUnitPath='/Students/Middle School'" showitemcountonly
Windows Command Prompt
for /f "delims=" %a in ('gam print users query "orgUnitPath='/Students/Middle School'" showitemcountonly') do set count=%a
```
## Verify domain membership
You have a CSV file of email addresses and want to verify of the addresses are valid users in your domain.

View File

@@ -6,7 +6,7 @@ gam version
GAM 7.28.00 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final
macOS Tahoe 26.0.1 x86_64
macOS Tahoe 26.1 x86_64
Path: /Users/Admin/bin/gam7
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
Time: 2023-06-02T21:10:00-07:00
@@ -18,7 +18,7 @@ gam version timeoffset
GAM 7.28.00 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final
macOS Tahoe 26.0.1 x86_64
macOS Tahoe 26.1 x86_64
Path: /Users/Admin/bin/gam7
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
Your system time differs from www.googleapis.com by less than 1 second
@@ -30,7 +30,7 @@ gam version extended
GAM 7.28.00 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final
macOS Tahoe 26.0.1 x86_64
macOS Tahoe 26.1 x86_64
Path: /Users/Admin/bin/gam7
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
Time: 2023-06-02T21:10:00-07:00
@@ -89,7 +89,7 @@ gam help
GAM 7.28.00 - https://github.com/GAM-team/GAM
GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final
macOS Tahoe 26.0.1 x86_64
macOS Tahoe 26.1 x86_64
Path: /Users/Admin/bin/gam7
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
Time: 2023-06-02T21:10:00-07:00

1
wiki/foo.lst Normal file
View File

@@ -0,0 +1 @@
ChromeOS-Devices.md Classroom-Courses.md Classroom-Membership.md Classroom-StudentGroups.md Cloud-Identity-Devices.md Cloud-Identity-Groups.md Domains.md GamUpdates.md Groups.md Mobile-Devices.md Organizational-Units.md Resources.md Shared-Drives.md Users-Shared-Drives.md Users.md