Giter Site home page Giter Site logo

headquaters's Introduction

HQ(Headquaters)

HQ is a GUI tool for remotely operating multiple PCs using PowerShell.

日本語

QuickStart

Remote PC

  1. Run PowerShell as an administrator, execute the following command.
Enable-PSRemoting

Local PC

  1. Run PowerShell as an administrator, execute the following command.
Set-Item WSMan:\localhost\Client\TrustedHosts -Value *

  1. Download HQ from Release page.
  2. Extract and start HQ (requires administrator authority)
  3. Enter user name and password of remote PC.
  4. Click on the script to use from the Scripts panel.
  5. Input parameters if the script requires.
  6. Enter the IP of the target PC in the IP List and check.
  7. Click run button(▶).
  8. Output is displayed in the frame at the bottom.
    On normal termination it will be displayed as ☑ [IP address]:

alt throuth

Script

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.

Examples:

CopyItem.ps1

param($session,$localPath,$remotePath)

Copy-Item -ToSession $session -Path $localPath -Destination $remotePath

StopProcess.ps1

param($session, $process)

Invoke-Command $session -ScriptBlock {
    param($process)
     Stop-Process -Name $process
} -ArgumentList ($process)

IP List

IP address and parameter table for each PC.
Editable on HQ.

alt editIPList

  • 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

Parameter

  • Parameters that are not in the IP List are saved in .\param.json.
  • User name and password are also saved.

TIPS

Accounts are different for each PC

If you prepare parametersUserName, UserPassword in IPList, it will be used.

⚠No Security

The password is saved in plaintext.
Be careful with handling param.json and ipList.csv.

Libraries:

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

headquaters's People

Contributors

fuqunaga avatar liyuan-teamlab avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.