Skip to content
ConsoleMonster
Cmdlet

Export-ConsoleTheme

Module
ConsoleMonster
Inputs
None
Outputs
System.IO.FileInfo

Exports the current ConsoleMonster theme as a starting file for a user or team.

Syntax

Export-ConsoleTheme
[-PassThru]
[-Path] <String>
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Writes every semantic token, foreground/background colour, explicit fallback tier and decoration as JSON or restricted PowerShell data. The current theme is unchanged. The file extension selects the format; the parent directory must already exist. JSON is UTF-8 without a BOM; PSD1 uses a UTF-8 BOM for Windows PowerShell 5.1.

Examples

Example 1

Export-ConsoleTheme -Path ./team-theme.json
Set-ConsoleTheme -Path ./team-theme.json

Export the current theme, edit its token definitions and apply it.

Example 2

Set-ConsoleTheme -Name ColorBlindSafe
Export-ConsoleTheme -Path ./accessible.psd1 -PassThru

Create a PowerShell data file from the accessible preset and return its file information.

Parameters

-PassThru SwitchParameter optional
Returns the written file as a FileInfo. Without this switch the command produces no pipeline output.
-Path String requiredposition: 0
The literal .json or .psd1 destination. An existing file is replaced after validation and ShouldProcess approval.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.