Skip to content

Cmdlet Reference ​

Complete reference for all PoshUI cmdlets organized by module.


PoshUI.Canvas (new in v1.4.0) ​

Canvas exports ~85 cmdlets — too many to inline here, and they follow a single consistent shape rather than needing individual write-ups:

New-PoshUICanvas → [Set-UITheme] → Add-UICanvasPage → Add-UICanvas* … → Show-PoshUICanvas

Nearly every control cmdlet accepts the same core parameters: -Name (addressable at runtime), -Value / -Label, -X/-Y/-Width/-Height, -Tooltip, -Visible/-Enabled, -Refresh <sec>, -Action { } / -OnChange { }, and a -Properties @{ } bag for styling and layout hints.

Full listings live in the Canvas docs:

ReferenceCovers
Capability ReferenceEvery control, the runtime cmdlets, charts, theming, flow modes, layout/chrome controls — terse and complete
About CanvasWhat Canvas is, how it works, the four execution substrates, sizing/DPI, the XAML escape hatch
Agent Authoring Guide (Docs/agent/)Per-cmdlet signatures with examples, plus a terse cheatsheet — written to be handed to an AI assistant

Quick orientation by category:

  • App & pages — New-PoshUICanvas, Add-UICanvasPage, Set-UITheme, Show-PoshUICanvas, Submit-UICanvas
  • Input — Add-UICanvasTextBox, -MultiLine, -Password, -Number, -Dropdown, -ListBox, -RadioGroup, -Checkbox, -Toggle, -Slider, -DatePicker, -TimePicker, -ColorPicker, -Rating, -AutoSuggest, -FilePicker, -FolderPicker
  • Display — Add-UICanvasLabel, -Icon, -Badge, -Banner, -ProgressBar, -ProgressRing, -Console, -Image, -Hyperlink, -Markdown, -Separator
  • Layout & chrome — Add-UICanvasPanel, -Card, -Expander, -Tabs/-Tab, -Viewbox, -GridSplitter, -Toolbar, -Footer, -Menu
  • Data — Add-UICanvasDataGrid, -TreeView, -Repeater, -ChartCard, -MetricCard, -StatusCard, -TableCard, -ScriptCard
  • Flows — Add-UICanvasWorkflowStep, Add-UICanvasWorkflow (-Engine), Add-UICanvasWizardNav, Add-UICanvasWizardSteps
  • Runtime (inside -Action/-OnChange/-Refresh) — Get-/Set-UICanvasValue, Set-UICanvasProperty, New-/Watch-/Get-/Set-UICanvasState, Show-UICanvasPage, Show-UICanvasToast/-Dialog/-Flyout, Start-UICanvasAsync, Set-UICanvasAnimate, Lock-/Unlock-UICanvasNavigation
  • Secondary windows — New-UICanvasWindow (authoring time) + Show-UICanvasWindow / Close-UICanvasWindow (runtime). A template is rebuilt on every open, so a control reading a file re-reads it each time
  • Escape hatch — Add-UICanvasXaml (splice raw WPF; x:Name'd elements stay drivable, and -Actions gives them scriptblocks)

PoshUI.Wizard ​

Build step-by-step guided interfaces for configuration, deployment, and setup tasks.

New-PoshUIWizard ​

Initializes a new wizard definition. Call this first before adding steps or controls.

powershell
New-PoshUIWizard -Title "Server Configuration"
ParameterTypeRequiredDescription
-TitleStringYesWindow title and sidebar header text.
-DescriptionStringNoPurpose description (not displayed, for documentation).
-IconStringNoWindow icon. Path to .png/.ico file or Segoe MDL2 glyph ('&#xE1D3;').
-SidebarHeaderTextStringNoCustom branding text in the sidebar header area.
-SidebarHeaderIconStringNoIcon next to sidebar header text. File path or Segoe MDL2 glyph.
-SidebarHeaderIconOrientationStringNoPosition of icon relative to text: Left (default), Right, Top, Bottom.
-ThemeStringNoColor theme: Auto (follows Windows), Light, Dark. Default: Auto.
-AllowCancelBooleanNoShow cancel/close button. Default: $true.
-LogPathStringNoCustom path for execution logs. Default: $env:LOCALAPPDATA\PoshUI\Logs\.

Show-PoshUIWizard ​

Displays the wizard window and executes the optional script body when the user clicks Finish.

powershell
Show-PoshUIWizard -ScriptBody {
    Write-Host "Creating VM: $VMName"
    # Your automation code here
}
ParameterTypeRequiredDescription
-ScriptBodyScriptBlockNoCode to execute after user completes the wizard. Has access to all control values as variables (e.g., $VMName, $Memory).
-DefaultValuesHashtableNoPre-populate controls with values. Keys match control names. Example: @{ VMName = 'Server01'; Memory = 4096 }
-NonInteractiveSwitchNoSkip UI display, use only -DefaultValues. Useful for testing or automated runs.
-ShowConsoleBooleanNoShow live execution console during -ScriptBody execution. Default: $true.
-ThemeStringNoOverride the theme set in New-PoshUIWizard for this execution.
-OutputFormatStringNoResult format: Object (default), JSON, Hashtable.
-RequireSignedScriptsSwitchNoEnforce Authenticode signature verification on generated scripts. For high-security environments.

Add-UIStep ​

Adds a page (step) to the wizard. Users navigate through steps using Next/Back buttons.

powershell
Add-UIStep -Name "Config" -Title "Configuration" -Icon "&#xE713;"
Add-UIStep -Name "Config" -Title "Configuration" -IconPath "C:\Icons\gear_3d.png"
ParameterTypeRequiredDescription
-NameStringYesUnique identifier. Use this name when adding controls to the step.
-TitleStringYesDisplay text shown in sidebar and step header.
-DescriptionStringNoSubtitle text shown below the title.
-IconStringNoSegoe MDL2 icon glyph (e.g., '&#xE713;' for Settings).
-IconPathStringNoPath to PNG/ICO image file for full-color sidebar icon. (v1.3.0)
-OrderIntNoDisplay order. Lower numbers appear first. Auto-assigned if omitted.
-TypeStringNoStep type: Wizard (default), Dashboard, Workflow.
-SkippableSwitchNoAllow users to skip this step.

Set-UIBranding ​

Customizes the visual appearance of the wizard window.

powershell
Set-UIBranding -WindowTitle "Contoso Setup"
Set-UITheme @{ AccentColor = "#0078D4" }   # accent lives on the theme, not on branding
ParameterTypeRequiredDescription
-WindowTitleStringNoOverride the window title bar text.
-WindowTitleIconStringNoPNG/ICO file path or Segoe MDL2 glyph for the title bar icon.
-SidebarHeaderTextStringNoBranding text in sidebar header.
-SidebarHeaderIconStringNoGlyph or PNG/ICO file path for sidebar header icon. (PNG support v1.3.0)
-SidebarHeaderIconOrientationStringNoIcon position relative to text: Left, Right, Top, Bottom.
-ThemeStringNoTheme override: Auto, Light, Dark.
-ThemeFileStringNoPath to custom XAML theme file.
-DisableAnimationsSwitchNoDisable UI transition animations.
-AllowCancelBooleanNoEnable/disable close button.

Set-UITheme (v1.3.0) ​

Defines independent color palettes for light and dark modes. Available in all modules (Wizard, Dashboard, Workflow).

powershell
Set-UITheme -Light @{
    AccentColor       = '#E91E63'
    SidebarBackground = '#880E4F'
} -Dark @{
    AccentColor       = '#00BFA5'
    SidebarBackground = '#0A1A18'
}
ParameterTypeRequiredDescription
-LightHashtableNoColor slot overrides for light mode.
-DarkHashtableNoColor slot overrides for dark mode.
-ThemeHashtableNoSingle palette applied to both modes (legacy).

Color Slots: Background, ContentBackground, CardBackground, SidebarBackground, SidebarText, SidebarHighlight, TextPrimary, TextSecondary, AccentColor, ButtonBackground, ButtonForeground, InputBackground, InputBorder, BorderColor, TitleBarBackground, TitleBarText, SuccessColor, WarningColor, ErrorColor, HeadingForeground, BodyForeground, SecondaryForeground

Only specify the slots you want to override. Unspecified slots use the built-in theme defaults. See Custom Themes for details.


Wizard Controls ​

Controls are input fields that collect data from users. Each control creates a PowerShell parameter accessible in your -ScriptBody.

Add-UITextBox ​

Single-line text input field.

powershell
Add-UITextBox -Step "Config" -Name "ServerName" -Label "Server Name" -Mandatory
ParameterTypeRequiredDescription
-StepStringYesName of the step to add this control to.
-NameStringYesControl identifier. Becomes the variable name in -ScriptBody (e.g., $ServerName).
-LabelStringYesText displayed above the input field.
-DefaultStringNoPre-filled value.
-MandatorySwitchNoUser must enter a value to proceed.
-PlaceholderStringNoGreyed hint text shown when field is empty.
-MaxLengthIntNoMaximum character limit.
-ValidationPatternStringNoRegex pattern the input must match. Example: '^[A-Za-z0-9-]+$'
-ValidationMessageStringNoError message shown when validation fails.
-WidthIntNoControl width in pixels.
-HelpTextStringNoTooltip text on hover.

Add-UIPassword ​

Secure password input with masked characters.

powershell
Add-UIPassword -Step "Security" -Name "AdminPassword" -Label "Administrator Password" -Mandatory -MinLength 8
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesControl identifier. Returns a SecureString in -ScriptBody.
-LabelStringYesDisplay label.
-MandatorySwitchNoRequire input.
-MinLengthIntNoMinimum password length.
-ValidationPatternStringNoRegex for password complexity. Example: '^(?=.*[A-Z])(?=.*\d).{8,}$' (uppercase + digit + 8 chars).
-ValidationScriptScriptBlockNoCustom validation logic. Receives password as $_. Return $true if valid.
-ValidationMessageStringNoError message for failed validation.
-ShowRevealButtonBooleanNoShow eye icon to reveal password. Default: $true.
-WidthIntNoControl width in pixels.
-HelpTextStringNoTooltip text.

Add-UIDropdown ​

Dropdown selection list (single choice).

powershell
Add-UIDropdown -Step "Config" -Name "Environment" -Label "Target Environment" `
    -Choices @('Development', 'Staging', 'Production') -Default 'Development'
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesControl identifier.
-LabelStringYesDisplay label.
-ChoicesString[]Yes*Static list of options. *Required unless using -ScriptBlock.
-ScriptBlockScriptBlockNoDynamic choices from PowerShell. See Dynamic Controls.
-DependsOnString[]NoControls that trigger re-evaluation of -ScriptBlock.
-DefaultStringNoPre-selected value (must be in choices).
-MandatorySwitchNoRequire selection.
-WidthIntNoControl width in pixels.
-HelpTextStringNoTooltip text.

Add-UIListBox ​

Multi-line selection list (single or multiple selection).

powershell
Add-UIListBox -Step "Config" -Name "Features" -Label "Select Features" `
    -Choices @('Web Server', 'Database', 'Monitoring', 'Backup') -MultiSelect
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesControl identifier. Returns String (single) or String[] (multi).
-LabelStringYesDisplay label.
-ChoicesString[]Yes*Static list of options. *Required unless using -ScriptBlock.
-ScriptBlockScriptBlockNoDynamic choices from PowerShell.
-DependsOnString[]NoControls that trigger re-evaluation.
-DefaultObjectNoPre-selected value(s). Array for multi-select.
-MultiSelectSwitchNoAllow selecting multiple items.
-MandatorySwitchNoRequire at least one selection.
-HeightIntNoListBox height in pixels. Default: 150.
-WidthIntNoControl width in pixels.
-HelpTextStringNoTooltip text.

Add-UICheckbox ​

Boolean checkbox (checked/unchecked).

powershell
Add-UICheckbox -Step "Config" -Name "EnableSSL" -Label "Enable SSL/TLS encryption" -Default $true
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesControl identifier. Returns $true or $false.
-LabelStringYesText displayed next to checkbox.
-DefaultBooleanNoInitial checked state. Default: $false.
-MandatorySwitchNoCheckbox must be checked to proceed.
-HelpTextStringNoTooltip text.

Add-UIToggle ​

Toggle switch (on/off) - visual alternative to checkbox.

powershell
Add-UIToggle -Step "Config" -Name "AutoStart" -Label "Start service automatically" -Default $true
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesControl identifier. Returns $true or $false.
-LabelStringYesDisplay label.
-DefaultBooleanNoInitial state. Default: $false.
-OnLabelStringNoText when ON. Default: "On".
-OffLabelStringNoText when OFF. Default: "Off".
-MandatorySwitchNoToggle must be ON to proceed.
-HelpTextStringNoTooltip text.

Add-UINumeric ​

Number input with optional spinner controls.

powershell
Add-UINumeric -Step "Config" -Name "Memory" -Label "Memory (GB)" -Minimum 1 -Maximum 64 -Default 4
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesControl identifier. Returns Int or Double.
-LabelStringYesDisplay label.
-DefaultObjectNoInitial value.
-MinimumObjectNoLowest allowed value.
-MaximumObjectNoHighest allowed value.
-IncrementObjectNoStep amount for spinner buttons. Default: 1.
-DecimalPlacesIntNoDecimal precision. Default: 0 (integers).
-MandatorySwitchNoRequire value entry.
-WidthIntNoControl width in pixels.
-HelpTextStringNoTooltip text.

Add-UIDate ​

Calendar date picker.

powershell
Add-UIDate -Step "Schedule" -Name "StartDate" -Label "Start Date" `
    -Minimum (Get-Date) -Maximum (Get-Date).AddDays(30)
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesControl identifier. Returns DateTime.
-LabelStringYesDisplay label.
-DefaultDateTimeNoInitial selected date.
-MinimumDateTimeNoEarliest selectable date.
-MaximumDateTimeNoLatest selectable date.
-FormatStringNoDisplay format string. Example: 'yyyy-MM-dd'.
-MandatorySwitchNoRequire date selection.
-WidthIntNoControl width in pixels.
-HelpTextStringNoTooltip text.

Add-UIFilePath ​

File path input with browse button.

powershell
Add-UIFilePath -Step "Config" -Name "ConfigFile" -Label "Configuration File" `
    -Filter "*.json" -ValidateExists
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesControl identifier. Returns file path string.
-LabelStringYesDisplay label.
-DefaultStringNoPre-filled path.
-FilterStringNoFile type filter. Examples: '*.ps1', '*.log;*.txt'. Default: `'All Files
-DialogTitleStringNoCustom title for the file picker dialog.
-ValidateExistsSwitchNoRequire the selected file to exist.
-MandatorySwitchNoRequire path entry.
-HelpTextStringNoTooltip text.

Add-UIFolderPath ​

Folder path input with browse button.

powershell
Add-UIFolderPath -Step "Config" -Name "OutputPath" -Label "Output Folder" -Mandatory
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesControl identifier. Returns folder path string.
-LabelStringYesDisplay label.
-DefaultStringNoPre-filled path.
-MandatorySwitchNoRequire path entry.
-HelpTextStringNoTooltip text.

Add-UIOptionGroup ​

Radio button group (mutually exclusive options).

powershell
Add-UIOptionGroup -Step "Config" -Name "InstallType" -Label "Installation Type" `
    -Options @('Typical', 'Custom', 'Minimal') -Default 'Typical'
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesControl identifier.
-LabelStringYesGroup label displayed above options.
-OptionsString[]YesList of radio button labels. Minimum 2 options required.
-DefaultStringNoPre-selected option (must be in options list).
-OrientationStringNoLayout: Vertical (default) or Horizontal.
-MandatorySwitchNoRequire selection.
-WidthIntNoControl width in pixels.
-HelpTextStringNoTooltip text.

Add-UICard ​

Informational card for displaying tips, warnings, or contextual help.

powershell
Add-UICard -Step "Welcome" -Title "Important" -Content "Back up your data before proceeding." `
    -Type "Warning" -Icon "&#xE7BA;"
ParameterTypeRequiredDescription
-StepStringYesStep name.
-TitleStringNoCard title text.
-ContentStringNoMain card content/message.
-TypeStringNoVisual style: Info (default), Success, Warning, Error, Tip.
-IconStringNoSegoe MDL2 icon glyph.
-IconPathStringNoPath to custom icon image.
-ImagePathStringNoPath to display image in card.
-ImageOpacityDoubleNoImage transparency (0.0-1.0). Default: 1.0.
-LinkUrlStringNoURL for clickable link.
-LinkTextStringNoLink display text. Default: "Learn more".
-BackgroundColorStringNoHex color for card background.
-TitleColorStringNoHex color for title text.
-ContentColorStringNoHex color for content text.
-CornerRadiusIntNoBorder radius in pixels. Default: 8.
-GradientStartStringNoStarting color for gradient background.
-GradientEndStringNoEnding color for gradient background.
-WidthStringNoCard width ('Auto' or pixels).
-HeightStringNoCard height ('Auto' or pixels).

Add-UIBanner ​

Carousel banner with rotating slides.

powershell
$slides = @(
    @{ Title = 'Welcome'; Subtitle = 'Getting started'; BackgroundColor = '#0078D4' }
    @{ Title = 'Step 2'; Subtitle = 'Configure settings'; BackgroundColor = '#107C10' }
)
Add-UIBanner -Step "Welcome" -CarouselItems $slides -AutoRotate $true
ParameterTypeRequiredDescription
-StepStringYesStep name.
-TitleStringNoStatic banner title (if not using carousel).
-SubtitleStringNoStatic banner subtitle.
-CarouselItemsHashtable[]NoArray of slide definitions. See below for properties.
-AutoRotateBooleanNoAuto-advance slides. Default: $false.
-RotateIntervalIntNoMilliseconds between slides. Default: 5000.
-BannerStyleStringNoPreset style: Default, Gradient, Image, Minimal, Hero, Accent.
-BannerConfigHashtableNoOverride preset properties (Height, TitleFontSize, etc.).
-HeightIntNoBanner height in pixels.
-BackgroundColorStringNoHex background color.
-BackgroundImagePathStringNoPath to background image.
-BackgroundImageOpacityDoubleNoBackground image transparency (0.0-1.0).

Carousel Item Properties:

  • Title - Slide title text
  • Subtitle - Slide subtitle text
  • BackgroundColor - Hex color for this slide
  • BackgroundImagePath - Image file path
  • BackgroundImageOpacity - Image transparency
  • LinkUrl - Clickable URL for this slide
  • Clickable - Enable click navigation ($true/$false)

PoshUI.Dashboard ​

Build card-based monitoring interfaces with live data refresh.

New-PoshUIDashboard ​

Initializes a new dashboard definition.

powershell
New-PoshUIDashboard -Title "System Monitor" -GridColumns 4
ParameterTypeRequiredDescription
-TitleStringYesWindow title.
-DescriptionStringNoDashboard description.
-IconStringNoWindow icon (file path or Segoe MDL2 glyph).
-SidebarHeaderTextStringNoBranding text in sidebar.
-SidebarHeaderIconStringNoSidebar branding icon.
-SidebarHeaderIconOrientationStringNoIcon position: Left, Right, Top, Bottom.
-ThemeStringNoTheme: Auto, Light, Dark.
-AllowCancelBooleanNoShow close button. Default: $true.
-GridColumnsIntNoCard columns (1-6). Default: 3.
-LogPathStringNoCustom log directory path.

Show-PoshUIDashboard ​

Displays the dashboard window.

powershell
Show-PoshUIDashboard -Theme Dark
ParameterTypeRequiredDescription
-ScriptBodyScriptBlockNoCode to execute (typically not needed for dashboards).
-DefaultValuesHashtableNoPre-populated control values.
-NonInteractiveSwitchNoRun without displaying UI.
-ShowConsoleBooleanNoShow execution console. Default: $true.
-ThemeStringNoOverride theme for this execution.
-OutputFormatStringNoResult format: Object, JSON, Hashtable.
-RequireSignedScriptsSwitchNoEnforce script signature verification.

Get-PoshUIDashboard ​

Inspects the current dashboard definition. Useful for debugging.

powershell
Get-PoshUIDashboard -IncludeProperties
ParameterTypeRequiredDescription
-IncludePropertiesSwitchNoShow all control properties.
-StepNameStringNoFilter to specific step.
-AsJsonSwitchNoOutput as JSON string.

Add-UIMetricCard ​

Dashboard Module Only - Displays a single numeric KPI with optional progress bar and automatic trend tracking.

powershell
Add-UIMetricCard -Step "Dashboard" -Name "CPU" -Title "CPU Usage" `
    -Value { (Get-CimInstance Win32_Processor).LoadPercentage } `
    -Unit "%" -Target 80
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesUnique card identifier.
-TitleStringYesCard header text.
-ValueObjectYesNumber or ScriptBlock returning a number. ScriptBlocks enable auto-refresh.
-DescriptionStringNoSubtitle below title.
-UnitStringNoUnit suffix (e.g., %, GB, items).
-FormatStringNoNumber format: N0 (integer), N2 (2 decimals), P0 (percent). Default: N0.
-TargetDoubleNoTarget value. Shows progress bar when specified.
-MinValueDoubleNoProgress bar minimum. Default: 0.
-MaxValueDoubleNoProgress bar maximum. Default: 100.
-IconStringNoSegoe MDL2 icon glyph (e.g., '&#xE7C4;').
-IconPathStringNoPath to PNG/ICO image file for full-color card icon. (v1.3.0)
-CategoryStringNoCategory for filtering. Default: "General".
-RefreshScriptScriptBlockNoCustom refresh logic. Automatically set if -Value is a ScriptBlock.

Note: Trend indicators (up/down/stable arrows) are automatically calculated by comparing current and previous values during refresh. You do not specify the trend direction manually.


Add-UIChartCard ​

Dashboard Module Only - Displays data visualization (Line, Bar, Area, Pie charts).

powershell
$data = @(
    @{Month='Jan'; Sales=100}
    @{Month='Feb'; Sales=150}
    @{Month='Mar'; Sales=120}
)
Add-UIChartCard -Step "Dashboard" -Name "SalesChart" -Title "Sales Trend" `
    -ChartType "Line" -Data $data
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesUnique card identifier.
-TitleStringYesCard header text.
-DataObjectYesArray of objects or ScriptBlock returning data.
-ChartTypeStringNoChart type: Line (default), Bar, Area, Pie.
-DescriptionStringNoSubtitle below title.
-ShowLegendBooleanNoDisplay chart legend. Default: $true.
-ShowTooltipBooleanNoShow tooltips on hover. Default: $true.
-IconStringNoSegoe MDL2 icon glyph.
-CategoryStringNoCategory for filtering. Default: "General".
-RefreshScriptScriptBlockNoCustom refresh logic. Automatically set if -Data is a ScriptBlock.

Add-UITableCard ​

Dashboard Module Only - Displays tabular data in a sortable and filterable grid.

powershell
Add-UITableCard -Step "Dashboard" -Name "Services" -Title "Windows Services" `
    -Data { Get-Service | Select-Object -First 10 Name, Status, StartType }
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesUnique card identifier.
-TitleStringYesCard header text.
-DataObjectYesArray of objects or ScriptBlock returning data.
-DescriptionStringNoSubtitle below title.
-IconStringNoSegoe MDL2 icon glyph.
-CategoryStringNoCategory for filtering. Default: "General".
-RefreshScriptScriptBlockNoCustom refresh logic. Automatically set if -Data is a ScriptBlock.

Add-UIScriptCard ​

Dashboard Module Only - Interactive card that runs PowerShell scripts when clicked. Script parameters are automatically converted to UI controls.

powershell
Add-UIScriptCard -Step "Tools" -Name "DiskCleanup" -Title "Disk Cleanup" `
    -Description "Clear temporary files" -Icon "&#xE74D;" `
    -ScriptBlock {
        param(
            [Parameter(Mandatory)]
            [ValidateSet('C','D','E')]
            [string]$Drive,

            [switch]$IncludeSystemFiles
        )
        # Cleanup logic here
        Write-Host "Cleaning drive $Drive..."
    }
ParameterTypeRequiredDescription
-StepStringYesStep name.
-NameStringYesUnique card identifier.
-TitleStringYesCard header text.
-ScriptPathStringYes*Path to .ps1 file. *Either -ScriptPath or -ScriptBlock is required.
-ScriptBlockScriptBlockYes*Inline script. *Either -ScriptPath or -ScriptBlock is required.
-DescriptionStringNoCard description shown below title.
-IconStringNoSegoe MDL2 icon glyph (e.g., '&#xE74D;').
-DefaultParametersHashtableNoDefault values for script parameters.
-CategoryStringNoCategory for filtering. Default: "General".
-TagsString[]NoAdditional filter tags.

Supported Parameter Types in Scripts:

PowerShell TypeUI Control
[string]Text box
[bool] / [switch]Toggle switch
[int] / [double]Numeric spinner
[DateTime]Date picker
[ValidateSet()]Dropdown
[WizardFilePath()]File browser
[WizardFolderPath()]Folder browser

PoshUI.Workflow ​

Orchestrate multi-step automated processes with progress tracking and reboot/resume.

New-PoshUIWorkflow ​

Initializes a new workflow definition.

powershell
New-PoshUIWorkflow -Title "Server Deployment" -Theme Dark
ParameterTypeRequiredDescription
-TitleStringYesWindow title.
-DescriptionStringNoWorkflow description.
-IconStringNoWindow icon (file path or Segoe MDL2 glyph).
-SidebarHeaderTextStringNoBranding text in sidebar.
-SidebarHeaderIconStringNoSidebar branding icon.
-SidebarHeaderIconOrientationStringNoIcon position: Left, Right, Top, Bottom.
-ThemeStringNoTheme: Auto, Light, Dark.
-AllowCancelBooleanNoShow close button. Default: $true.
-LogPathStringNoCustom log directory path.

Show-PoshUIWorkflow ​

Displays the workflow window and executes tasks.

powershell
Show-PoshUIWorkflow
ParameterTypeRequiredDescription
-DefaultValuesHashtableNoPre-populated control values.
-NonInteractiveSwitchNoRun without displaying UI.
-ThemeStringNoOverride theme for this execution.
-OutputFormatStringNoResult format: Object, JSON, Hashtable.
-AppDebugSwitchNoEnable debugging features.
-RequireSignedScriptsSwitchNoEnforce script signature verification.

Add-UIWorkflowTask ​

Adds an executable task to the workflow. Tasks run sequentially with progress tracking.

powershell
Add-UIWorkflowTask -Step "Execution" -Name "InstallIIS" -Title "Install IIS" -Order 1 `
    -ScriptBlock {
        $PoshUIWorkflow.UpdateProgress(10, "Starting IIS installation...")
        Install-WindowsFeature -Name Web-Server
        $PoshUIWorkflow.UpdateProgress(100, "IIS installation complete")
    }
ParameterTypeRequiredDescription
-StepStringYesName of Workflow step to add task to.
-NameStringYesUnique task identifier.
-TitleStringYesTask display name in UI.
-DescriptionStringNoTask description.
-OrderIntNoExecution order. Auto-assigned if omitted.
-IconStringNoSegoe MDL2 icon glyph.
-ScriptBlockScriptBlockYes*Task code. *Required for normal tasks.
-ScriptPathStringNoPath to .ps1 file (alternative to ScriptBlock).
-ArgumentsHashtableNoArguments to pass to the script.
-TaskTypeStringNoNormal (default) or ApprovalGate.
-OnErrorStringNoError handling: Stop (halt workflow) or Continue.

Advanced Task Parameters:

ParameterTypeRequiredDescription
-RetryCountIntNoNumber of retry attempts on failure. Default: 0 (no retry).
-RetryDelaySecondsIntNoSeconds to wait between retries. Default: 5.
-TimeoutSecondsIntNoMax execution time in seconds. 0 = no timeout.
-SkipConditionStringNoPowerShell expression. If true, task is skipped. Can reference wizard values ($ParamName) or workflow data ($WorkflowData['key']).
-SkipReasonStringNoMessage shown when task is skipped.
-GroupStringNoGroup/phase name for visual organization.
-RollbackScriptBlockScriptBlockNoCleanup code to run if this task fails.
-RollbackScriptPathStringNoPath to rollback .ps1 file.

Approval Gate Parameters (when -TaskType ApprovalGate):

ParameterTypeRequiredDescription
-ApprovalMessageStringYesMessage displayed to user.
-ApproveButtonTextStringNoApprove button text. Default: "Approve".
-RejectButtonTextStringNoReject button text. Default: "Reject".
-RequireReasonSwitchNoRequire reason when rejecting.
-TimeoutMinutesIntNoAuto-timeout (0 = no timeout).
-DefaultTimeoutActionStringNoAction on timeout: None, Approve, Reject.

Save-UIWorkflowState ​

Saves workflow state for reboot/resume scenarios. Uses DPAPI encryption.

powershell
Save-UIWorkflowState
ParameterTypeRequiredDescription
-PathStringNoCustom state file path. Default: $env:LOCALAPPDATA\PoshUI\PoshUI_Workflow_State.dat
-WorkflowUIWorkflowNoSpecific workflow to save. Default: current workflow.
-NoEncryptionSwitchNoSave as plain JSON (debugging only, not recommended).

Resume-UIWorkflow ​

Resumes a workflow from saved state. Completed tasks are skipped.

powershell
if (Test-UIWorkflowState) {
    Resume-UIWorkflow
    Show-PoshUIWorkflow
}
ParameterTypeRequiredDescription
-PathStringNoPath to state file.
-StateHashtableNoPre-loaded state from Get-UIWorkflowState.

Test-UIWorkflowState ​

Checks if saved workflow state exists.

powershell
if (Test-UIWorkflowState) {
    Write-Host "Resumable workflow found"
}
ParameterTypeRequiredDescription
-PathStringNoPath to check. Default: standard location.

Get-UIWorkflowState ​

Retrieves saved workflow state.

powershell
$state = Get-UIWorkflowState
$state.CurrentTaskIndex  # See which task to resume
ParameterTypeRequiredDescription
-PathStringNoPath to state file.

Clear-UIWorkflowState ​

Removes saved workflow state file.

powershell
Clear-UIWorkflowState
ParameterTypeRequiredDescription
-PathStringNoPath to state file.

Next Steps ​