Skip to content

Register-SPCLicense

Validates and activates a SPClean license key. Writes the key to %APPDATA%\SPClean\license.lic and clears the in-memory cache so the new tier takes effect immediately in the current session.

Synopsis

Register-SPCLicense
    -LicenseKey <string>
    [-Force]
    [-WhatIf]
    [-Confirm]

Parameters

Parameter Type Required Description
-LicenseKey string ✅ The standard UUID license key generated by Gumroad
-Force switch Overwrite an existing license.lic without prompting
-WhatIf switch Validate the key and show what would change, without writing the file
-Confirm switch Prompt for confirmation before writing

Returns

SPC.LicenseInfo reflecting the newly activated license.

Key validation

Keys are validated online against the Gumroad License API. Internet access is required on the first run and every 7 days thereafter for re-verification. The validation result is securely cached locally to support offline use between checks.

Examples

Register-SPCLicense -LicenseKey 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
# Verify the key is valid before committing
Register-SPCLicense -LicenseKey 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' -WhatIf

Error codes

Code Meaning
ERR-LIC-001 Key format is invalid or cannot reach the API
ERR-LIC-002 Cannot write license file to disk
ERR-LIC-003 Feature requires a Pro or Consultant license
ERR-LIC-004 Feature requires a Consultant license

See also