Execute PowerShell commands on remote Windows via DevKit REST API
| Flag | Short | Description | Takes Value |
|---|---|---|---|
--help |
-h |
Show help message and exit | Yes |
--stream |
-s |
Stream output in real-time as the command executes | No |
-H |
— |
DevKit host address (IP or hostname of the Windows machine) | Yes |
-c |
— |
PowerShell command to execute on the remote host | Yes |
-t |
— |
Timeout in seconds for the remote command execution | Yes |
-w |
— |
Working directory on the remote Windows host for command execution | Yes |
# Execute a simple PowerShell command on a remote Windows host $ scorpiox-pwsh -H 192.168.1.50 -c "Get-Process | Select-Object -First 5" Handles NPM(K) PM(K) WS(K) CPU(s) Id ProcessName ------- ------ ----- ----- ------ -- ----------- 432 18 12340 22568 1.42 1024 explorer 156 8 4520 8960 0.31 2048 svchost 289 14 8760 15340 0.87 3072 taskhostw 98 5 2140 5120 0.12 4096 conhost 512 22 18960 32480 2.15 5120 devenv
# Use --stream for long-running commands to see output as it arrives $ scorpiox-pwsh -H 10.0.0.5 --stream -c "Get-EventLog -LogName System -Newest 20" Index Time EntryType Source InstanceID Message ----- ---- --------- ------ ---------- ------- 18542 Mar 13 09:01 Information Service Con.. 1073748869 The background... 18541 Mar 13 08:55 Warning Disk 2147483654 The driver det... ...
# Run a command in a specific remote directory $ scorpiox-pwsh -H 192.168.1.50 -w "C:\Projects\MyApp" -c "Get-ChildItem -Recurse -Filter *.cs | Measure-Object -Line" Lines Words Characters Property ----- ----- ---------- -------- 14523
# Limit execution to 60 seconds — useful for potentially slow remote calls $ scorpiox-pwsh -H 10.0.0.5 -t 60 -c "Get-WmiObject Win32_Product | Select-Object Name, Version" Name Version ---- ------- Microsoft Visual C++ 2019 14.29.30133 Python 3.11.4 (64-bit) 3.11.4150.0 Git 2.41.0
# Check disk space on the remote Windows machine $ scorpiox-pwsh -H 192.168.1.50 -c "Get-PSDrive -PSProvider FileSystem | Format-Table Name, Used, Free -AutoSize" Name Used Free ---- ---- ---- C 198.4 GB 301.6 GB D 450.2 GB 49.8 GB # Restart a Windows service remotely $ scorpiox-pwsh -H 192.168.1.50 -c "Restart-Service -Name 'wuauserv' -Force; Get-Service 'wuauserv'" Status Name DisplayName ------ ---- ----------- Running wuauserv Windows Update
# Use in a CI pipeline to deploy and verify on Windows $ scorpiox-pwsh -H build-server -c "msbuild MyApp.sln /p:Configuration=Release" --stream Microsoft (R) Build Engine version 17.6.3 Build started 3/13/2026 10:15:22 AM. MyApp -> C:\Projects\MyAppin\Release\MyApp.exe Build succeeded. 0 Warning(s) 0 Error(s)
scorpiox/scorpiox-pwsh.clibsxutil