0
votes

I have a problem with start-job and invoke-command. When I run it locally it works as it should, but when I use it remotely it just exists and does nothing. This is the command:

invoke-command {start-job { & notepad}}

Notepad is just an example, as I want another process to run in the background. How to fix it to work remotely? It seems like an issue with powershell session closing after invoke-command. On Linux it was fixed by using nohup command but I can't find anything that would resemble it in powershell.

1

1 Answers

0
votes

I'd do this, from the local system:

invoke-command -scriptblock { & notepad } -computername <remote computer> -asjob