none
Add Remove Programs on Workgroup Lab with PowerShell RRS feed

  • Question

  • Hi All,

         I have a situation that I thought was pretty straight forward, but I am having difficulty. I have a Workgroup lab that we use for software regression testing and product delivery. It contains about 30 Win 7 machines and a Sever 2012R2 box. This environment requires us to be able to add and remove our software builds very frequently. I am looking for a way to automate the install and uninstall of our software with a script ran from the server.

         I think what I need help with is knowing what the most effective method would be. I have set up the WSMAN trusts to allow PSSession on all of the machines. I have gotten the WMICLASS installer to work and point it at all of my machines using the Get-Content Cmdlet, but this "serial" approach seems painfully slow. Is there an efficient way to run these commands on all of my machines simultaneously? 

        I am very new to PowerShell and I think that perhaps I am just not aware of all of the possibilities yet. 

      Thank You

    Friday, November 21, 2014 5:01 AM

Answers

  • Use a workflow with a parallel task.


    ¯\_(ツ)_/¯

    • Marked as answer by MDA_Admin Friday, November 21, 2014 6:41 PM
    • Unmarked as answer by MDA_Admin Friday, November 21, 2014 6:46 PM
    • Marked as answer by MDA_Admin Friday, November 21, 2014 7:58 PM
    Friday, November 21, 2014 8:59 AM

All replies

  • Use a workflow with a parallel task.


    ¯\_(ツ)_/¯

    • Marked as answer by MDA_Admin Friday, November 21, 2014 6:41 PM
    • Unmarked as answer by MDA_Admin Friday, November 21, 2014 6:46 PM
    • Marked as answer by MDA_Admin Friday, November 21, 2014 7:58 PM
    Friday, November 21, 2014 8:59 AM
  • Rite on,

      I didn't know about this, but did some research and this is exactly what I was looking for. Although workflow foreach -parallel does not seem to support calling methods i.e. $appToRemove.Uninstall(), I was able to put a .ps1 file on each of my lab computers and use the workflow to Invoke-Command simultaneously on each machine from the server.

       thanks 

    Saturday, November 22, 2014 2:52 AM
  • You need to learn how t use "inlinescript".  An inline script is similar to storing a script remotely.


    ¯\_(ツ)_/¯

    Saturday, November 22, 2014 4:04 AM