开发者

PowerShell Start-Job and Oracle

I have a ps script (say Set-Data.ps1) that calls a ps Run.ps1 with Start-Job as : Start-Job -FilePath Run.ps1 -ArgumentList 1, 2

In Run.ps1 I have a line of code as:

$cs = ...;
Write-Output "1";
$开发者_JAVA技巧conn = New-Object Oracle.DataAccess.Client.OracleConnection($cs);
$conn.Open();

Write-Output "2";

From cmd prompt I run Set-Data.ps1.

The program never prints "2" from line ==> Write-Output "2";

The job stats keeps showing as Running.

Why is this so?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜