gcpw_cleanup.ps1 - limehawk/rmm-scripts GitHub Wiki

gcpw_cleanup.ps1

Removes Google Credential Provider for Windows (GCPW) registry keys and folders.

Overview

Removes Google Credential Provider for Windows (GCPW) registry keys and folders to allow for a clean reinstallation or complete removal.

Purpose

Removes Google Credential Provider for Windows (GCPW) registry keys and folders to allow for a clean reinstallation or complete removal.

Prerequisites

  • Windows 10/11 or Windows Server
  • Administrator privileges

Configuration

Required Inputs

None

Behavior

  1. Deletes GCPW-related registry keys
  2. Deletes Chrome enrollment registry keys
  3. Removes GCPW policy and credential folders
  4. Reports results

Security Notes

  • No secrets in logs
  • Requires elevated privileges
  • Does NOT uninstall GCPW itself (use Programs & Features for that)

Exit Codes

  • 0 = Success
  • 1 = Failure

Example Output

[ CLEANING REGISTRY KEYS ]
--------------------------------------------------------------
Chrome Enrollment    : Removed
GCPW                 : Removed
CloudManagement      : Removed

[ CLEANING FOLDERS ]
--------------------------------------------------------------
Policies Folder      : Removed
Credential Provider  : Removed

[ FINAL STATUS ]
--------------------------------------------------------------
SCRIPT SUCCEEDED

[ SCRIPT COMPLETED ]
--------------------------------------------------------------

Version History

  • 2024-12-01 v1.0.0 - Initial release - migrated from SuperOps (converted from batch)

Links