Here is a remake of jpmik’s “Asynchronously Execute PowerShell Scripts” written in .NET C# and WPF, plus the following extra features:

  • Save new or remove PowerShell preset scripts.
  • Import PowerShell script files directly.
  • Drag and drop PowerShell script files onto the Script Editor.
  • Export selected lines or all lines of output to a text file.

Source Code on GitHub

Screenshots

Loading all preset scripts
Loading all preset scripts

During application startup or adding/removing preset script will display this Loader overlay to show that the application is loading/reloading all preset script files from presets folder.

Application UI once finished loading preset scripts
Application UI once finished loading preset scripts
Example of executing PowerShell script from selected preset script
Example of executing PowerShell script from selected preset script
Example of selecting output lines for exporting to a text file
Example of selecting output lines for exporting to a text file
Example of saving current script as new preset script
Example of saving current script as new preset script
Create a new name for the script
Create a new name for the script
Importing script from PowerShell script file (.ps1)
Importing script from PowerShell script file (.ps1)

Preset scripts

Preset scripts are stored in plain text files in the “presets” folder, where the title of the script is the filename of the text file itself. This makes it easier to manually modify the script or add a batch of scripts without needing to run the application. It is more manageable and easy to back up or synchronize with a cloud storage service.