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?
精彩评论