A PowerShell module for creating WPF-based user interfaces for data querying. Define your forms declaratively via CSV and get structured results back — no XAML required.
Install-Module -Name PSWindowUIFrom PowerShell Gallery.
Import-Module PSWindowUI
$Content = @'
ControlType;Name;Value;Required
Headline;User Data;;
TextBox;First Name;;True
TextBox;E-Mail;;True
ComboBox;Department;Engineering,Marketing,Sales;
CheckBox;Newsletter;False;
DatePicker;Start Date;;True
'@ | ConvertFrom-Csv -Delimiter ';' | New-Control
$Result = New-Window -Title 'User Form' -Content $Content -SubmitButtonText 'Save' -CancelButtonText 'Cancel'
if ($Result.DialogResult) {
$Result.Content | Format-Table -AutoSize
}| ControlType | Description | Value Parameter |
|---|---|---|
Headline |
Bold section header | (not used) |
TextBox |
Single-line text input | Default text |
CheckBox |
Boolean toggle | True / False |
ComboBox |
Dropdown selection | Comma-separated items |
DatePicker |
Date selection | Date string (e.g. 2025-01-15) |
RadioButton |
Exclusive choice (use with GroupName) | True / False |
PasswordBox |
Masked text input | Default password |
| Parameter | Type | Default | Description |
|---|---|---|---|
ControlType |
Enum | (req) | Type of control to create |
Name |
String | (req) | Label text |
Value |
Object | Initial value | |
ValueDelimiter |
String | , |
Literal delimiter for ComboBox items |
LabelWidth |
Int | 200 |
Label column width in pixels |
ValueWidth |
Int | 200 |
Input column width in pixels |
Required |
String | '' |
Marks field as required. Accepts "True"/"False", $true/$false, "1"/"0". Optimized for ConvertFrom-Csv. |
ValidationPattern |
String | Regex pattern the value must match | |
GroupName |
String | Group name for RadioButton mutual exclusion |
| Parameter | Type | Default | Description |
|---|---|---|---|
Title |
String | User Interface |
Window title |
Height |
Int | 700 |
Window height (100–2000) |
Width |
Int | 450 |
Window width (100–2000) |
Content |
Grid[] | (req) | Controls from New-Control |
SubmitButtonText |
String | Submit |
Submit button label |
CancelButtonText |
String | Cancel |
Cancel button label |
Required fields are highlighted with a red border if left empty on submit.
Fields with a ValidationPattern are checked against the regex before the dialog closes.
$Content = @'
ControlType;Name;Value;Required;ValidationPattern
TextBox;E-Mail;;True;^[\w\.-]+@[\w\.-]+\.\w+$
TextBox;Phone;;False;
DatePicker;Start Date;;True;
'@ | ConvertFrom-Csv -Delimiter ';' | New-Control
$Result = New-Window -Title 'Validated Form' -Content $Content -SubmitButtonText 'Save'New-Window returns a PSCustomObject with:
- DialogResult —
$true(Submit) or$false/$null(Cancel / window closed) - Content — Array of
[PSCustomObject]@{ Id; Name; Value }for each non-headline control
- PowerShell 7.4 or later
- Windows (WPF requires PresentationFramework)