Set-CatInstance
Stores the Enterprise license key on this machine — or removes it. Works without sign-in.
On this page
Synopsis
Set-CatInstance [[-LicenseKey] <string>] [[-LoggingLevel] <string>] [[-LoggingPath] <string>]
Parameters
| Parameter | Type | Position | Default | Meaning |
|---|---|---|---|---|
-LicenseKey |
string | 0 | The key to store. Empty or omitted removes the stored key. | |
-LoggingLevel |
string | 1 | None |
None · Fatal · Error · Warning · Information · Debug · Verbose. |
-LoggingPath |
string | 2 | Documents\CAT\Logs\cat-log.log |
Log file, when logging is on. |
What it does
Writes the key to %APPDATA%\CAT\.catconfig (~/.config/CAT/.catconfig on Linux), the file that identifies this installation and is shared by every CAT tool on the machine. It does not sign in — a key can be installed on a machine that has no portal access and no token. Setting a key is how the Enterprise plan is activated; once a valid key is stored, every cmdlet works offline and CAT_PORTAL_TOKEN is no longer read. The key takes effect immediately for the next cmdlet; no restart is needed.
The key is checked before it is stored: a genuine CAT key is stored even when it is expired or not yet valid (what it unlocks is decided at every use, and a future key starts working the day its window opens); anything that is not a CAT key — a typo, a truncated paste — is refused and the stored key is left unchanged.
Output
Nothing. With -Verbose, the steps.
Errors
Terminating error LicenseKeyNotSet — The license key was not set. <reason> — when the key is not a CAT key. Removing a key never fails.
Examples
# activate the Enterprise plan on this machine
Set-CatInstance -LicenseKey 'your-license-key'
Get-CatInstance | Select-Object LicenseKey
# go back to no key (sign-in with CAT_PORTAL_TOKEN applies again)
Set-CatInstance -LicenseKey ''
Related
- Introduction — session model, logging, errors, sign-in. (sign-in, plans and the license key)
Get-CatInstance— see what is stored.- Get CAT license · Apply a license key · Compare plans.