none
How do you run a powershell script on one machine against multiple computers. RRS feed

  • General discussion

  • I'm a babe in the woods when it comes to PS scripting. I have PS scripts the run .bat file on one server against many servers, but can't seem to adapt it to run a PS script against multiple servers.

    SITUATION: I have a PS script that changes multiple registry values on a server. I've tested it and it works fine running it on one machine. I would like to run this script from server "101" and have it change the registry values on servers 105 through 115 without having to copy the script to each server. I've been going through the "Windows powershell Cookbook", but obviously something's not clicking in my head.

    Thanks for your help in advance!!

     

    

    • Changed type Bill_Stewart Wednesday, September 13, 2017 8:48 PM
    • Moved by Bill_Stewart Wednesday, September 13, 2017 8:49 PM This is not "teach me basics of system management" forum
    Monday, July 17, 2017 10:07 PM

All replies

  • You will know the answer to that question once you learn PowerShell.  There are many ways to do this depending on what you are trying to accomplish.

    Start here to set your expectations: This forum is for scripting questions rather than script requests


    \_(ツ)_/

    Monday, July 17, 2017 10:10 PM
  • By far the easiest way to deploy registry changes to multiple computers is via Group Policy, not a script.

    -- Bill Stewart [Bill_Stewart]

    Monday, July 17, 2017 10:10 PM
  • Active Directory is a hell of a drug.
    Monday, July 17, 2017 10:12 PM
  • I'm a babe in the woods when it comes to PS scripting. I have PS scripts the run .bat file on one server against many servers, but can't seem to adapt it to run a PS script against multiple servers.

    SITUATION: I have a PS script that changes multiple registry values on a server. I've tested it and it works fine running it on one machine. I would like to run this script from server "101" and have it change the registry values on servers 105 through 115 without having to copy the script to each server. I've been going through the "Windows powershell Cookbook", but obviously something's not clicking in my head.

    Thanks for your help in advance!!

     

    

    First of all If change Reg values, I recommend you use GPO, otherwise if you want to do it on remote computers.
    learn about psSession
    and invoke the command


    • Edited by asafgb Wednesday, July 19, 2017 7:00 AM
    Wednesday, July 19, 2017 7:00 AM