sorry if someone already asked this... We're currently setting up some scripts for managing docker container. Because we want our colleagues to submit an application for creating a container we need some automatic processes in the background. So I came up with somthing that doesn't work quite as well as it should:
There are 3 scripts involved.
The first one to fetch all applications.
It runs the following piece of code:
Start-Process powershell -LoadUserProfile -Credential $Credential -ArgumentList "-Command C:\Users\xyz\script2.ps1 -path $root" script2.ps1:
Runs a CmdLet from the BcContainerHelper-Package which creates the container. Somewhere between the lines it runs
New-PSSession -session .... to connect to the container an run some commands.
But when I run the first script via a task over the task scheduler when the user is logged off i get an error which contains the following message:
**Terminating Error(New-PSSession) **
Seems like Powershell isn't able to create a remote connection. Has that something to do with privileges?
I need to get this to work! Has someone an idea why this isn't working?
1 Reset to default