gcpw_install.ps1 - limehawk/rmm-scripts GitHub Wiki
gcpw_install.ps1
Downloads, installs, and configures Google Credential Provider for Windows (GCPW).
Overview
Downloads, installs, and configures Google Credential Provider for Windows (GCPW). Sets allowed domains and enrollment token in the system registry.
Purpose
Downloads, installs, and configures Google Credential Provider for Windows (GCPW). Sets allowed domains and enrollment token in the system registry.
Prerequisites
- Windows 10/11 or Windows Server
- Administrator privileges
- Internet access
- Valid Google Workspace enrollment token
Configuration
Required Inputs
$domainsAllowedToLogin: Comma-separated list of allowed Google Workspace domains$enrollmentToken: GCPW enrollment token from Google Admin Console
Behavior
- Validates administrative privileges
- Downloads GCPW installer (32-bit or 64-bit based on OS)
- Installs GCPW silently
- Configures allowed domains in registry
- Configures enrollment token in registry
Security Notes
- Enrollment token should be kept confidential
- Only listed domains will be allowed to login
- Requires elevated privileges
Exit Codes
- 0 = Success
- 1 = Failure
- 5 = Configuration error (missing domains or not admin)
Example Output
[ INPUT VALIDATION ]
--------------------------------------------------------------
Allowed Domains : example.com,corp.example.com
Enrollment Token : ********-****-****-****-************
[ DOWNLOADING GCPW ]
--------------------------------------------------------------
Architecture : 64-bit
Filename : gcpwstandaloneenterprise64.msi
Download : SUCCESS
[ INSTALLING GCPW ]
--------------------------------------------------------------
Installation : SUCCESS
[ CONFIGURING REGISTRY ]
--------------------------------------------------------------
Domains : Configured
Enrollment Token : Configured
[ FINAL STATUS ]
--------------------------------------------------------------
SCRIPT SUCCEEDED
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
Version History
- 2024-12-01 v1.0.0 - Initial release - migrated from SuperOps (sanitized)
Links
- View Script Source
- Scripts - Back to script index