none
Newb remote question RRS feed

  • Question

  • I'm trying to schedule a remote reboot. I found a script that will set a scheduled task to reboot a machine once a week. I can't figure out how to get it to connect to the remote machine.

    $Service=New-Object-ComObject("Schedule.Service")

    foreach

    ($Computerin$Computers)

    {

    try

        {

    # Connect schedule service to remote computer

    $Service.Connect($Computer)

    Not sure what I need to add to get that info in there.

    Sorry for the noobness.

    • Moved by Bill_Stewart Wednesday, May 9, 2018 2:47 PM Unanswerable drive-by question
    Thursday, March 22, 2018 7:02 PM

All replies

  • Please do NOT post colorized code or text. It breaks the thread and is unreadable.  lease use the code posting tool provided.


    \_(ツ)_/

    Thursday, March 22, 2018 9:14 PM
  • $computerin$computers sounds like it is pulling a file with a list of machines..... are you following me here?
    Thursday, March 22, 2018 9:18 PM