Closed markekraus closed 6 years ago
did some digging on the jobs.. not much helpful there.
$Job1 | fl * -force
$Job1.ChildJobs[0] | fl * -force
State : Failed
HasMoreData : False
StatusMessage :
Location : localhost
Command : Start-sleep -Seconds 2; Get-Date
JobStateInfo : Failed
Finished : System.Threading.ManualResetEvent
InstanceId : a5e30a71-f698-47a3-b2ff-ea3a357d0dd1
Id : 57
Name : Job57
ChildJobs : {Job58}
PSBeginTime : 5/5/2018 12:16:08 PM
PSEndTime : 5/5/2018 12:16:08 PM
PSJobTypeName : BackgroundJob
Output : {}
Error : {}
Progress : {}
Verbose : {}
Debug : {}
Warning : {}
Information : {}
State : Failed
StatusMessage :
HasMoreData : False
Location : localhost
Runspace : System.Management.Automation.RemoteRunspace
Debugger :
IsAsync : True
Command : Start-sleep -Seconds 2; Get-Date
JobStateInfo : Failed
Finished : System.Threading.ManualResetEvent
InstanceId : f498e7e1-d009-4b53-98b6-460ed27afa9b
Id : 58
Name : Job58
ChildJobs : {}
PSBeginTime :
PSEndTime : 5/5/2018 12:16:08 PM
PSJobTypeName :
Output : {}
Error : {}
Progress : {}
Verbose : {}
Debug : {}
Warning : {}
Information : {}
The errors look more helpful
$err = $error[0]
$err | fl * -force
$err.exception | fl * -force
writeErrorStream : True
PSMessageDetails :
Exception : System.Management.Automation.Remoting.PSRemotingTransportException: An error occurred while
starting the background process. Error reported: The system cannot find the file specified.
---> System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Management.Automation.Runspaces.PowerShellProcessInstance.Start()
at System.Management.Automation.Remoting.Client.OutOfProcessClientSessionTransportManager.Cre
ateAsync()
--- End of inner exception stack trace ---
TargetObject : localhost
CategoryInfo : OpenError: (localhost:String) [], PSRemotingTransportException
FullyQualifiedErrorId : -2147467259,PSSessionStateBroken
ErrorDetails : [localhost] An error occurred while starting the background process. Error reported: The system
cannot find the file specified.
InvocationInfo :
ScriptStackTrace :
PipelineIterationInfo : {}
ErrorCode : -2147467259
TransportMessage :
ErrorRecord : An error occurred while starting the background process. Error reported: The system
cannot find the file specified.
WasThrownFromThrowStatement : False
Message : An error occurred while starting the background process. Error reported: The system
cannot find the file specified.
Data : {}
InnerException : System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file
specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Management.Automation.Runspaces.PowerShellProcessInstance.Start()
at System.Management.Automation.Remoting.Client.OutOfProcessClientSessionTransportManag
er.CreateAsync()
TargetSite :
StackTrace :
HelpLink :
Source :
HResult : -2146233087
Looks like I would have to ship the actual pwsh
executable for this to work.
Since the licensing situation for that is fraught with peril I'm frankly very annoyed.
This appears to be an upstream issue PowerShell/PowerShell#7052 closing
I'm trying run the following code blocks
Or any kind of combination to start a job and receive it. I get the following exception for all of them:
Note: My purpose for using jobs in the jupyter notebook was to demonstrate different methods of parallel and concurrent programming in PowerShell with pretty markdown all around it. Not trying to do anything real fancy.