Get Help

Get-CatInstance

Returns the identity and versions of this CAT installation, the stored license key and the platform it runs on. Works without sign-in.

Synopsis

Get-CatInstance [[-LoggingLevel] <string>] [[-LoggingPath] <string>]

Parameters

Parameter Type Position Default Meaning
-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

Reads %APPDATA%\CAT\.catconfig (~/.config/CAT/.catconfig on Linux) and the runtime, and writes one object describing the installation. It does not sign in and does not need a token or a key — it is the one cmdlet that always works, which makes it the first thing to run when something else does not. If a CAT session already exists it is reused; otherwise a throw-away one is created and disposed.

Output

One CatInstanceInfoDTO object:

Property Meaning
InstanceID Identity of this installation (a GUID, created on first use).
InstallationTimestamp When the instance was created.
LicenseKey The stored license key, or empty.
AutomationPlatform The CI/CD platform CAT detected it was started by, or empty for an interactive start — what the interactive-only rule sees.
CatTool PowerShellModule.
CoreVersion, ToolVersion Versions of the CAT engine and of the module.
Platform, OsVersion Windows / Linux and the OS version.
Expectations, Providers The expectations and providers this version knows, as one string each.

The plan is not on this object — it is decided at sign-in and is visible on Get-CatSession.

Errors

None in normal use.

Examples

Get-CatInstance
Get-CatInstance | Select-Object ToolVersion, CoreVersion, Platform

# is a license key stored on this machine?
[bool](Get-CatInstance).LicenseKey