Cmdlet
Export-ConsolePrompt
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 SetsDescription
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 -WhatIfPreview exporting the current prompt
Example 2
$promptOptions = @{
Preset = 'Developer'
Path = './developer.prompt.json'
WhatIf = $true
}
Export-ConsolePrompt @promptOptionsPreview exporting a preset as a starting point
Parameters
- -Description String
- A one-line description stored in the file.
- -PassThru SwitchParameter
- Returns the written file as a FileInfo. Without this switch the command produces no pipeline output.
- -Path String
- The literal .json destination.
- -Preset String
- A built-in preset to export instead of the current configuration.
- Possible values:
Plain,Powerline,Diamond,Minimal,Focus,Timeline,Developer,Cloud - -Title String
- 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.