0
我試圖用powershell作業,但他們卡住的原因。powershells的卡住的作業
Untitled2.ps1:
$A = "papa"
$B = "mama"
Start-Job -ScriptBlock { MainHA $args[0] $args[1] } -ArgumentList @($A, $B) -InitializationScript { . "C:\Tools\Untitled3.ps1" }
While (Get-Job -State "Running")
{
write-host Still working...
Get-Job | Receive-Job
Start-Sleep 1
}
Get-Job | Receive-Job
Remove-Job *
Untitled3.ps1:
Function MainHA ($x, $y)
{
write-host $x, $y
}
任何想法?
我的答案有幫助嗎?如果不是,你解決了這個問題嗎? (如果有的話,你應該發佈自己的答案) – Rynant