What am I doing Wrong? RRS feed

  • Question

  • OK, so I wrote this little one liner to try and run a vbs script on a collection that I am having trouble getting to take the sccm.exe updates.  But, when I run the PS it starts off grabbing the 1st computer in the list and then just hangs there.

    Could somebody PLEASE tell me what I doing wrong?

    foreach ($computer in $computers) {write-host ($computer); Invoke-Command -Scriptblock {C:\Windows\System32\pstools\psexec.exe  \\$Computer CMD  |C:\users\dqualls\desktop\evluation.vbs  } }

    • Moved by jrv Friday, September 6, 2019 3:34 PM Correct forum
    Friday, September 6, 2019 2:48 PM

All replies