Skip to content
ConsoleMonster
Cmdlet

Get-ConsoleDemo

Module
ConsoleMonster
Inputs
None
Outputs
System.Management.Automation.PSObject System.IO.FileInfo

Lists the copyable ConsoleMonster gallery demos or exports one PowerShell script.

Syntax

Get-ConsoleDemo
[[-Slug] <String>]
[<CommonParameters>]
#
Parameter set: List
Get-ConsoleDemo
[-Force]
-Path <String>
[-Slug] <String>
[<CommonParameters>]
#
Parameter set: Export

Description

Returns the embedded gallery metadata, including slug, title, pitch, category, tags, terminal size, runtimes, add-ons, customization ideas, mode and snapshot count. Listing accepts a slug or wildcard pattern. With -Path, an exact slug exports the canonical self-contained script as UTF-8; ConsoleMonster must be installed to run it. The parent directory must exist. Existing files are preserved unless -Force is supplied.

Examples

Example 1

Get-ConsoleDemo | Select-Object Slug, Title, Pitch

Browse the gallery.

Example 2

Get-ConsoleDemo 'welcome-*'

List the welcome demos.

Example 3

Get-ConsoleDemo assessment -Path ./assessment.ps1
./assessment.ps1 -StaticSnapshot -Step 0

Export a demo to customize and run.

Parameters

-Slug String required in Exportposition: 0
Slug or wildcard pattern to list. Export requires one exact slug.
-Force SwitchParameter optionalsets: Export
Allows replacing the destination file when exporting.
-Path String requiredsets: Export
Literal filesystem destination for the script. Returns the exported FileInfo.

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.