0
Warum wird die Ausgabe der Read-Host-Zeile im folgenden Code vor der Ausgabe des Jobs angezeigt?Start-Job produziert keine erwartete Ausgabe
$WorkingDirectory = Get-Location
$ScriptBlockForJob = {
Get-ChildItem $Input -Directory `
| Where-Object `
{$_.GetFiles().Count -eq 0 -and $_.GetDirectories().Count -eq 0} `
| Select-Object FullName
}
Start-Job -InputObject $WorkingDirectory -ScriptBlock $ScriptBlockForJob | Wait-Job | Receive-Job
Read-Host 'Above is a list of empty directories. Press enter to begin deleting them'
The code above yields this ouput