Answer the question
In order to leave comments, you need to log in
Why doesn't Job work when called remotely?
Good afternoon, gentlemen) I’ve been fighting for the second day, but I can’t do anything, I’ll have to ask)
Subject 2:
I have:
WS 2012 R2 with OpenSSH on board
powershell script
Task: implement remote procedure call AsJob
As you want: be able to enter 1 on the necessary PCs line of the form
ssh [email protected] powershell -file "path\to\script" args
ssh [email protected] powershell -file "path\to\script" args
You have to wait a long time for the script to run. If you implement this AsJob, then it starts background processes, ends the SSH session and ... dies with it) Answer the question
In order to leave comments, you need to log in
background processes in powershell run in the same process in which they are running, it's like bg in the shell. with the dying of the shell and the processes die.
you need to open Persistent Sessions. but they will also need to be stored so that
https://docs.microsoft.com/en-us/powershell/module...
or create tasks with the scripts you need
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question