This Windows Forms application is designed to streamline the execution of PowerShell scripts on remote Windows computers.
It is particularly useful for system administrators and IT professionals who need to manage multiple machines across a network securely and efficiently.
- Visual Studio 2022
- C#
- PowerShell
- PowerShell 7
- Visual Studio 2022
- .NET Framework 4.8.1 Developer Pack (or greater)
- .NET 7.0
- The left panel allows selecting files from predefined folders (
ComputersandScripts). - The right panel becomes active if you enable the checkbox "Option to browse files".
- After selecting both a computer list and a script, click the red arrow button to execute.
- Output is shown in the application console.
- Go to the application directory.
- Open
user.txtand add users (e.g.,domain\adminuser) who are authorized to run PowerShell scripts remotely.
- Launch the app.
- Go to Menu → Set up Vault.
- Select a user from the dropdown (loaded from
user.txt). - Click Go to store the secret for that user.
✅ Example success message:
Secret 'domain\adminuser' stored successfully in vault 'domain\adminuser'.
ℹ️ By default, the secret and vault use the same name. You can change this by editing
setvault.ps1.
-
Open
InvokeScript.ps1in Notepad. -
Modify the following line with the vault and secret name you used:
$cred = (Get-Secret -Vault domain\adminuser -Name domain\adminuser)
-
Save and close the file.
You have two options to select scripts and target machines:
- Save PowerShell scripts to the
Scriptsfolder. - Save computer lists (
.txtfiles) to theComputersfolder.
- Enable the checkbox "Option to browse files".
- Use the file pickers to load your script and computer list manually.
- After selecting a script and computer list, click the Run button.
- The script will execute on the listed remote computers.
- Output will appear in the app console.
📁 YourAppDirectory
├── Scripts # Common PowerShell scripts
├── Computers # Text files with target computer names
├── user.txt # List of authorized users
├── setvault.ps1 # Vault creation script
├── InvokeScript.ps1
└── YourApp.exe
Credentials are securely managed using the following PowerShell modules:
Microsoft.PowerShell.SecretManagementMicrosoft.PowerShell.SecretStore
- Ensure
user.txtis correctly populated before setting up the vault. - Vault and secret names must match those referenced in
InvokeScript.ps1.
