Skip to content
ConsoleMonster
Cmdlet

Export-ConsolePrompt

Module
ConsoleMonster
Outputs
System.IO.FileInfo

Writes the prompt configuration or a built-in preset as a prompt theme file to share.

Syntax

Export-ConsolePrompt
[-Description <String>]
[-PassThru]
[-Path] <String>
[-Preset <String>]
[-Title <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Writes JSON that Set-ConsolePrompt -Path and Show-ConsolePrompt -Path read. Without Preset, the file holds the effective configuration of this session. The parent directory must already exist; an existing file is replaced after ShouldProcess approval.

Examples

Example 1

Export-ConsolePrompt -Path ./team.prompt.json -WhatIf

Preview exporting the current prompt

Example 2

$promptOptions = @{
    Preset = 'Developer'
    Path = './developer.prompt.json'
    WhatIf = $true
}
Export-ConsolePrompt @promptOptions

Preview exporting a preset as a starting point

Parameters

-Description String optional
A one-line description stored in the file.
-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 destination.
-Preset String optional
A built-in preset to export instead of the current configuration.
Possible values: Plain, Powerline, Diamond, Minimal, Focus, Timeline, Developer, Cloud
-Title String optional
The theme name stored in the file. Defaults to the preset name or the file name.

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.