Skip to content
ConsoleMonster
Cmdlet

Export-ConsoleDemo

Module
ConsoleMonster
Inputs
None
Outputs
System.IO.FileInfo

Exports one embedded demo as a copyable PowerShell script.

Syntax

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

Description

Use Get-ConsoleDemo to list slugs. Saves the canonical script as UTF-8 with a BOM for PowerShell 5.1. The destination folder must exist. Existing files are preserved unless Force is explicit.

Examples

Example 1

Export-ConsoleDemo assessment -Path ./assessment.ps1

Save a demo to customize.

Parameters

-Force SwitchParameter optional
Allows replacing an existing destination file.
-PassThru SwitchParameter optional
Returns the saved file.
-Path String required
Literal filesystem destination for the script.
-Slug String requiredposition: 0
The exact gallery slug.

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.