en-GB/about_tcs.core.help.txt

TOPIC
    about_tcs.core

SHORT DESCRIPTION
    Shared configuration, update checks, telemetry and utilities for tcs modules.

LONG DESCRIPTION
    tcs.core is the base module for the TheCodeSaiyan PowerShell suite
    (tcs.azure, tcs.confluence, tcs.jira, tcs.intune.packaging, tcs.utils).

    Each tcs module calls Get-ModuleConfig when it loads. The settings file for
    a module is:

        <ApplicationData>/PowerShell/Config/<ModuleName>/Module.Config.json

    It is created with defaults the first time the module loads and is changed
    with Set-ModuleConfig.

    Update check
        Get-ModuleStatus checks the PowerShell Gallery for a newer version at
        most once every UpdateCheckIntervalHours (default 24).

    Telemetry
        Invoke-TelemetryCollection sends anonymous usage events (command name,
        duration, success, exception type, PowerShell and OS version and a
        random installation ID). No user, machine, path or error text is sent.
        Nothing is sent until a TelemetryUri is configured.

    Secret protection
        Protect-ConfigValue and Unprotect-ConfigValue use DPAPI on Windows and
        AES-256 with HMAC-SHA256 on Linux and macOS.

ENVIRONMENT VARIABLES
    TCS_TELEMETRY_OPTOUT=1 Turns telemetry off for all tcs modules.
    TCS_SKIP_UPDATE_CHECK=1 Turns the gallery update check off.
    TCS_CONFIG_ROOT Moves the settings folder.
    TCS_TELEMETRY_URI Overrides the telemetry endpoint.
    TCS_TELEMETRY_APIKEY Overrides the telemetry API key.
    TCS_MACHINE_KEY_PATH Linux/macOS LocalMachine protection key location.

EXAMPLES
    Turn off update warnings for tcs.core:

        Set-ModuleConfig -ModuleName tcs.core -UpdateWarning $false

    Turn off telemetry for every tcs module:

        $env:TCS_TELEMETRY_OPTOUT = '1'

    Protect a secret for the current user:

        $protected = Protect-ConfigValue -Value 'P@ssw0rd'
        Unprotect-ConfigValue -EncryptedValue $protected

SEE ALSO
    Get-ModuleConfig
    Set-ModuleConfig
    Get-ModuleStatus
    Invoke-TelemetryCollection
    Protect-ConfigValue
    https://github.com/ntatschner/TheCodeSaiyan-PowerShell-tcs.core

KEYWORDS
    tcs
    TheCodeSaiyan
    Configuration
    Telemetry