Cmdlet
Export-ConsoleDemo
Exports one embedded demo as a copyable PowerShell script.
Syntax
Export-ConsoleDemo
[-Force]
[-PassThru]
-Path <String>
[-Slug] <String>
[<CommonParameters>]#Parameter set:
All Parameter SetsDescription
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.ps1Save a demo to customize.
Parameters
- -Force SwitchParameter
- Allows replacing an existing destination file.
- -PassThru SwitchParameter
- Returns the saved file.
- -Path String
- Literal filesystem destination for the script.
- -Slug String
- 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.