HQ is a GUI tool for remotely operating multiple PCs using PowerShell.
- Run PowerShell as an administrator, execute the following command.
Enable-PSRemoting
- Run PowerShell as an administrator, execute the following command.
Set-Item WSMan:\localhost\Client\TrustedHosts -Value *
- Download HQ from Release page.
- Extract and start HQ (requires administrator authority)
- Enter user name and password of remote PC.
- Click on the script to use from the Scripts panel.
- Input parameters if the script requires.
- Enter the IP of the target PC in the IP List and check.
- Click run button(▶).
- Output is displayed in the frame at the bottom.
On normal termination it will be displayed as☑ [IP address]:
File path:
.\*.ps1
.\Scripts\*.ps1
- You can add your own script by putting the file in the above place.
- A script is called for each IP on th IP List.
- A script can receive PSSession of remote PC with
$session
. - Variables specified with
param()
are displayed on HQ and can be edited.
param($session,$localPath,$remotePath)
Copy-Item -ToSession $session -Path $localPath -Destination $remotePath
param($session, $process)
Invoke-Command $session -ScriptBlock {
param($process)
Stop-Process -Name $process
} -ArgumentList ($process)
IP address and parameter table for each PC.
Editable on HQ.
- saved in
.\ipList.csv
- The first row is the parameter name.
- IP can be a range(IPAddressRange).
192.168.10.10-20
192.168.0.10 - 192.168.10.2
- Parameters that are not in the IP List are saved in
.\param.json
. - User name and password are also saved.
If you prepare parametersUserName
, UserPassword
in IPList, it will be used.
The password is saved in plaintext.
Be careful with handling param.json and ipList.csv.
https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit - MaterialDesignInXamlToolkit
https://github.com/jsakamoto/ipaddressrange - IPAddressRange
https://www.newtonsoft.com/json - Json.NET
https://github.com/Fody/Costura - Costura.Fody