-
Notifications
You must be signed in to change notification settings - Fork 474
l Managing CloudPrint Printers
gam update printer <id> [quotaEnabled <true|false>] [dailyQuota <number>] [public <true|false> [name <name>] [proxy <proxy>] [description <description>]
Updates the given printer. The optional parameter quotaEnabled enables or disables a daily quota for users using the printer. The optional parameter dailyQuota sets the number of pages users can print a day when quotaEnabled is true. The optional parameter public sets the printer to be accessible to anyone who knows the printer's URL when true. The optional parameters name and description adjust the name and description of the printer. The optional parameter proxy adjusts the proxy id for the printer (dangerous).
This example makes the printer public and sets a 5 pages a day quota.
gam update printer 86bee4bb-c43e-8fd4-f06e-e7b8564a1c53 public true quotaEnabled true dailyQuota 5
gam info printer <id> [everything]
Gets detailed information about the given CloudPrint printer. The optional everything argument includes even more printer detail.
This example prints details about the given printer.
gam info printer __google__docs
status:
isTosAccepted: False
updateTime: 2013-06-03 15:22:04
displayName: Save to Google Drive
description: Save your document as a PDF in Google Drive
name: Save to Google Docs
tags: save docs pdf google __google__drive_enabled
defaultDisplayName: Save to Google Drive
accessTime: 2011-09-15 20:14:01
id: __google__docs
ownerName: Cloud Print
capsHash:
ownerId: cloudprinting@gmail.com
type: DRIVE
createTime: 2011-07-22 17:00:03
proxy: google-wide
gam delete printer <id>
Deletes the given printer. Be aware that depending on your printer / print proxy, the printer may be recreated soon after it's deleted. You should make sure your printer or print proxy is no longer registering the printer either.
This example deletes the printer that has ID 86bee4bb-c43e-8fd4-f06e-e7b8564a1c53
gam delete printer 86bee4bb-c43e-8fd4-f06e-e7b8564a1c53
gam print printers [query <query>] [type <type>] [status <status>] [extrafields <connectionStatus|semanticState|uiState|queuedJobsCount>] [todrive]
CSV output of printers owned or accessible by the user GAM is running as. The optional parameter query limits results to printers that have a title or tag matching the search value. The optional parameter type limits results to printers of the given type. The optional parameter status limits results to printers with the given status. The optional parameter extrafields includes the given extra CSV fields in the result but may significantly slow the performance of the print command. The optional parameter todrive creates a Google Drive Spreadsheet of the results rather than outputting CSV to the console.
This example prints all printers accessible by the user.
gam print printers
this example prints all printers with a name or tag like "HP".
gam print printers query HP
gam printer <id> add USER|MANAGER <group or user email>
Share the given printer with the given Google user or group. A USER is able to print to the printer. A MANAGER is able to print to the printer as well as share the printer with additional users/groups. If the printer owner is not an owner of the Google Group, an owner of the group will need to manually accept the printer on the group's behalf.
Note, to make a printer public, use the update printer command above.
This example shares the printer with the group students@acme.edu.
gam printer 86bee4bb-c43e-8fd4-f06e-e7b8564a1c53 add USER students@acme.edu
this example gives helpdesk@acme.edu manager access to the printer.
gam printer 86bee4bb-c43e-8fd4-f06e-e7b8564a1c53 add MANAGER helpdesk@acme.edu
gam printer <id> remove <group or user email>
Remove access to the given printer for the given user or group.
This example revokes student access to the printer.
gam printer 86bee4bb-c43e-8fd4-f06e-e7b8564a1c53 remove students@acme.edu
gam printer <id> showacl
Shows the current ACLs of the given printer. If the printer is shared publicly, then a URL will be returned by which any user can access the printer.
This example prints the ACLs for the printer.
gam printer 86bee4bb-c43e-8fd4-f06e-e7b8564a1c53 showacl
gam printjob <printer id> submit <file or url>
Submits a file or URL to be sent to the given CloudPrint printer. If the value begins with http:// or https:// it is assumed to be a web URL and the page is retrieved for printing, otherwise it's assumed to be a local file. Generally PDF, JPG and GIF images print successfully but other formats like Microsoft Office may also work (with somewhat limited conversion success).
Please be aware that this command is primarily meant for testing and troubleshooting of CloudPrint. GAM does not currently support setting print options like color/bw, copies, pages, etc.
This example prints the current homepage for Google.
gam printjob 86bee4bb-c43e-8fd4-f06e-e7b8564a1c53 submit http://www.google.com
this example prints a PDF file.
gam printjob 86bee4bb-c43e-8fd4-f06e-e7b8564a1c53 submit c:\docs\findings.pdf
gam printjob <id> cancel
Cancels the given print job. Note that the job remains visible in the CloudPrint UI with a cancelled status but the printer should not try to print the job.
Note: While cancelled print jobs will not be printed by the CloudPrint printer, the print job data may remain on Google's servers for up to 30 days before expiring.
This example cancels a print job.
gam printjob 21fc3546-8fbc-f185-acea-2b28e3ffaba3 cancel
This complex example retrieves all print jobs that are either owned by the GAM admin or are sent to printers owned by the GAM admin and have remained in a QUEUED status for more than hour. It then cancels all of the jobs.
This example could be run on a regular basis to make sure that print jobs older than an hour are cancelled while a printer or printer proxy is down / backed up.
gam print printjobs status QUEUED older_than 1h | gam csv - gam printjob ~id cancel
gam printjob <id> delete
Deletes the given print job. The print job will no longer be printed (if it hasn't been already) and no data or metadata for the print job should remain.
This example deletes the print job.
gam printjob 21fc3546-8fbc-f185-acea-2b28e3ffaba3 delete
gam print printjobs [older_than <number><m|h|d>] [newer_than <number><m|h|d>] [query <query>] [status <status>] [printer <printer id>] [owner <user email>] [limit <Number>] [todrive]
Provides a CSV output of all print jobs. The optional arguments older_than
and newer_than
limit results to print jobs created in the given time. The optional query
argument limits results to jobs whose title or tags match the given query. The optional status
argument limits the results to jobs whose status is provided. The optional printer
argument limits results to jobs sent to the given printer id. The optional owner
argument limits results to jobs sent by the given user. The optional limit <Number>
argument limits the number of jobs output to <Number>
; the default value for <Number>
is 25, set <Number>
to 0 for no limit. The optional todrive
argument creates a Google Drive Spreadsheet of the results rather than sending CSV output to the console.
This example prints all print jobs owned by the GAM admin or sent to a printer owned by the GAM admin.
gam print printjobs
this example creates a Google Drive Spreadsheet of all print jobs with status DONE.
gam print printjobs status DONE todrive
this complex example deletes print jobs still in a QUEUED status after 1 day.
gam print printjobs status QUEUED older_than 1d | gam csv - gam printjob ~id delete
Need more help? Ask on the GAM Discussion Group
Update History
Installation
- How to Install GAM7
- How to Upgrade GAMADV-XTD3 to GAM7
- How to Upgrade Legacy GAM to GAM7
- How to Update GAM7
- Verifying a GAM7 Build is Legitimate and Official
- Install GAM as Python Library
- GAM7 on Chrome OS Devices
- GAM7 on Android Devices
- Google Network Addresses
- HTTPS Proxy
- SSL Root CA Certificates
- How to Uninstall GAM7
Configuration
- Authorization
- GAM Configuration
- Running GAM7 securely on a Google Compute Engine
- Using GAM7 with a delegated admin service account
- Using GAM7 with a YubiKey
- GAM with minimal GCP rights
Notes and Information
- Upgrade Benefits
- Questions? Visit the GAM Discussion Forum
- GAM Public Chat Room
- Scripts
- Other Resources
- Drive REST API v3
- BNF Syntax
- GAM Return Codes
- Python Regular Expressions
- Rclone
Definitions
Command Processing
- Bulk Processing
- Command Line Parsing
- Command Logging and Progress
- Command data from Google Docs/Sheets/Storage
- CSV Special Characters
- CSV Input Filtering
- CSV Output Filtering
- Meta Commands and File Redirection
- Permission matches
- Tag Replace
- Todrive
Collections
Client Access
- Addresses
- Administrators
- Alert Center
- Aliases
- Calendars
- Calendars - Access
- Calendars - Events
- Chrome Auto Update Expiration Counts
- Chrome Browser Cloud Management
- Chrome Device Needs Attention Counts
- Chrome Installed Apps
- Chrome Policies
- Chrome Printers
- Chrome Profile Management
- Chrome Version Counts
- Chrome Version History
- ChromeOS Devices
- Classroom - Courses
- Classroom - Guardians
- Classroom - Invitations
- Classroom - Membership
- Cloud Channel
- Cloud Identity Devices
- Cloud Identity Groups
- Cloud Identity Groups - Membership
- Cloud Identity Policies
- Cloud Storage
- Context Aware Access Levels
- Customer
- Domains
- Domains - Verification
- Domain People - Contacts & Profiles
- Domain Shared Contacts - Global Address List
- Email Audit Monitor
- Find File Owner
- Google Data Transfers
- Groups
- Groups - Membership
- Inbound SSO
- Licenses
- Mobile Devices
- Organizational Units
- Reports
- Reseller
- Resources
- Send Email
- Schemas
- Shared Drives
- Sites
- Users
- Unmanaged Accounts
- Users - Signout and Turn off 2-Step Verification
- Vault - Takeout
- Version and Help
Special Service Account Access
Service Account Access
- Users - Analytics Admin
- Users - Application Specific Passwords
- Users - Backup Verification Codes
- Users - Calendars
- Users - Calendars - Access
- Users - Calendars - Events
- Users - Chat
- Users - Classification Labels
- Users - Classroom - Profile
- Users - Deprovision
- Users - Contacts
- Users - Contacts - Delegates
- Users - Drive - File Selection
- Users - Drive - Activity/Settings
- Users - Drive - Cleanup
- Users - Drive - Comments
- Users - Drive - Copy/Move
- Users - Drive - Files-Display
- Users - Drive - Files-Manage
- Users - Drive - Orphans
- Users - Drive - Ownership
- Users - Drive - Permissions
- Users - Drive - Query
- Users - Drive - Revisions
- Users - Drive - Shortcuts
- Users - Drive - Transfer
- Users - Forms
- Users - Gmail - Client Side Encryption
- Users - Gmail - Delegates
- Users - Gmail - Filters
- Users - Gmail - Forwarding
- Users - Gmail - Labels
- Users - Gmail - Messages/Threads
- Users - Gmail - Profile
- Users - Gmail - S/MIME
- Users - Gmail - SendAs/Signature/Vacation
- Users - Gmail - Settings
- Users - Group Membership
- Users - Keep
- Users - Looker Studio
- Users - Meet
- Users - Classroom - Profile
- Users - People - Contacts & Profiles
- Users - Photo
- Users - Profile Sharing
- Users - Shared Drives
- Users - Spreadsheets
- Users - Tasks
- Users - Tokens
- Users - YouTube
GAM Tutorials
- Account Auditing
- Calendar Settings
- Chat Bot commands
- Chrome Browser Management
- Chrome Policy Settings
- Context Aware Access levels
- Data Transfers
- Domain Verification
- Google Drive Management
- Group Settings
- Inbound SSO Settings
- Managing Admins
- Managing Classroom
- Managing Custom User Schemas
- Managing Devices
- Managing Organizations
- Managing Product Licenses
- Managing Users, Groups, Aliases, Domains, Mobile and Chrome Devices, and Resource Calendars
- OAuth Authentication Related Commands
- Print Users, Groups, Aliases, Mobile and Chrome OS devices, OUs, Licenses and Reports
- Printers
- Unmanaged Users and Invitations
- User Email Settings
- User Security Settings