- Aug
- 2,298
- 111
I have created a test .ps1 file to show a problem;
When I invoke it using Powershell from TCC, the result is returned to the console.
When I invoke it using the pshell command, the result is not returned to the console.
In my .ps1 file, Receive-Job returns the result to the console.
Can pshell be made to work with Receive-Job?
This may be related to this thread.
Joe
Code:
$ScriptBlock = {$J = New-Object -com jlcutils.cMath; $J.ppp(6.59)}
$MyJob = start-job -scriptblock $ScriptBlock -RunAs32
$MyJob | Wait-Job | Receive-Job
Remove-Job $MyJob
When I invoke it using Powershell from TCC, the result is returned to the console.
When I invoke it using the pshell command, the result is not returned to the console.
In my .ps1 file, Receive-Job returns the result to the console.
Can pshell be made to work with Receive-Job?
This may be related to this thread.
Joe
Code:
TCC 21.01.49 x64 Windows 7 [Version 6.1.7601]
Copyright 2017 JP Software Inc. All Rights Reserved
Your evaluation period expires in 27 days.
You can buy Take Command, TCC, and CMDebug at https://jpsoft.com
[c:\utils]powershell -file 32bitCOM.ps1
2.99186
[c:\utils]pshell 32bitCOM.ps1
[c:\utils]