Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

Ausgabeumleitung in Datei

$
0
0

Hallo,

ich möchte mehrere CopyJobs parallel laufen lassen. Das funktioniert auch. Nur die Umleitung, um den Status zu loggen, funktioniert nicht innerhalb von Start-Job. Ohne Start-Job, wird alles  in $11 geschrieben. Was kann ich ändern? Danke Jens

$111 = start-job -ScriptBlock {

$11 = "Abteilungsablage.txt"

get-date > $11 #startzeit
Write-Output "0000000000000000000000000--COPYJOB--0000000000000000000000" >> $11
robocopy bla blub /schalt >> $11
get-date >> $11 #jobende

Write-Output "0000000000000000000000000--RESTLOG--0000000000000000000000" >> $11
get-date >> $11
robocopy bla blub /schalt >> $11
get-date >> $11

}


Viewing all articles
Browse latest Browse all 2314


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>