Skip to content

gcpw_install.ps1

Corey Watson edited this page Dec 19, 2025 · 1 revision

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

  1. Validates administrative privileges
  2. Downloads GCPW installer (32-bit or 64-bit based on OS)
  3. Installs GCPW silently
  4. Configures allowed domains in registry
  5. 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

Clone this wiki locally