Powershell Forms: Deploy batches to remote servers with psexec

Powershell GUI to deploy bat/txt scripts to remote computers with psexec (windows) and plink (linux) or execute powershell scripts to them


STEPS:
  1. Select proper credentials from the credentials combobox (optional). The first time you will need to fill it with a descriptive name for them. In the moment you run the script it will ask for that credentials and save them for next time.
  2. Write the computernames in Computers textbox or click the button above to select txt file that contains them
  3. Choose any of the pre-deploy options:
    • test ping computers first
    • test the ports needed to work
    • do nothing, directly execute the script
  4. Choose the script you want to run from ScriptRepository
  5. Run!

This GUI allows you to execute any script to a list of computers.

All scripts that are shown in the GUI treeview are the ones under ScriptRepository folder, the only thing you need to do is store your own batches and powershell scripts in it.

When creating your own powershell scripts just bear in mind that the list of computers will fill the variable $computername and the credentials will be saved in $creds
Here is an example for restarting a list of computers:
restart-computer -computername $computername -credential $creds -force -confirm:$false

It is not necessary to close and open the form when you want to refresh the treeview list. Just double click any of the tabs.
You don't need to close and open the form if you change any of the scripts under the ScriptRespository folder either.

I have uploaded some of my scripts and batches as examples.
Notice that underscore '_' character in scriptnames is used to create grouping levels inside the GUI treeview in order to keep them organized.

Download from Github

Comments