Lately, I’ve been doing some testing with Avalonia UI and PowerShell in DeployR, and one of the things I wanted to try was a simple dialog for entering a computer name during a task sequence. The result is a PowerShell script that dynamically creates an Avalonia form and returns the computer name entered by the user.
What makes this particularly useful with DeployR is that the script can be embedded directly into the task sequence. WPF-based PowerShell frontend scripts don’t work the same way in DeployR. They need to be added as a content item, or to the boot image, and then executed using pwsh.exe (PowerShell 7). For something as simple as a computer name prompt, having the entire script directly in the task sequence is quite handy.


DeployR 1.3 Requirements
If you’re using DeployR 1.3, the following two Avalonia files need to be copied to the DeployR Client folder (default C:\Program Files\2Pint Software\DeployR\Client). Here is a script that does that for you: https://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/DeployR/Download-AvaloniaLoader.ps1
- Avalonia.Markup.Xaml.Loader.dll
- Avalonia.Markup.Xaml.Loader.xml
After adding the files, restart the DeployR Service so the DeployR client Windows x64 content item gets updated, then regenerate the Windows PE x64 boot mage. This is just a temporary solution for DeployR 1.3, these files will be included by default with the upcoming DeployR 1.4 version.
Why Avalonia?
WPF has been the standard choice for building PowerShell GUIs on Windows for a very long time, and I’ve written plenty of WPF-based deployment tools myself. That said, Avalonia has a few things going for it.
First, Avalonia is cross-platform. WPF is Windows-only, while Avalonia supports Windows, Linux, and macOS. Obviously DeployR is primarily being used to deploy Windows today, but there has been an uptick in customers using DeployR to deploy Linux as well. I've only deployed Ubuntu with DeployR, but there is support for Fedora, and RedHat Enterprise Linux (RHEL).
Avalonia is also based on modern .NET and will feel fairly familiar if you’ve worked with WPF. It uses the same general concepts around controls, layouts, XAML, bindings, and so on.
And, at least for this particular DeployR scenario, as mentioned earlier: the Avalonia PowerShell code works directly as an embedded task sequence script.
Adding the Sample Avalonia Frontend
The sample is intentionally an easy one. It displays a dialog asking for a computer name and then makes that value available to the task sequence. But the same approach could easily be used for other deployment-time questions, such as selecting a location, department, deployment type, or applications.
To add the frontend, simply access or download the script, and paste it into a Run Powershell script step in the task sequence
The frontend: https://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/DeployR/SampleAvaloniaFrontend.ps1

2026-09-14 17:42:54.702 [error] PowerShell does not support debugging this language mode: 'Log'.
I have enough issues with normal powershell. I'm not sure how this is gonna work…
It's still just PowerShell, but you can absolutely continue to use WPF-based frontends which are a bit easier to code for.
What else can be done with it? Garys seems to work, would this be compatible in VS code to modify as well?.
Pretty much anything, it's just PowerShell building the Avalonia form, in the same way as folks are using PowerShell to build WPF forms.