I started a few powershell jobs and I want to stop them at a scheduled time. I know the command to stop them is Stop-Job -Name $someName
but I don't know how I can schedule this.
I mean I realize there is task scheduler, but how do I get to the jobs that are started inside my powershell window, since there seems to be some sort of scoping problem here.
Also, can I create the scheduled task from Powershell? That would solve my issue with leaving the Window and it not showing up in the powershell scope of the script that I run.