Hello everbody,
i am glad there is a forum to search for help.
I am a powershell noob so please feel free to explain a LOT
What do I want?
I would like to run a job with powershell.
the first part (of whats interessting for you) of the code would be:
$job = {Copy-Item -Path C:\Users\lscho\Desktop\quelle -Destination C:\Users\lscho\Desktop\ziel -Recurse -Force}
start-job -Name Kopieren -ScriptBlock $job
so far so good⌠this works as it should be
Copying from A to B. Perfect!
But: I would like some kind of⌠Waiting Output.
My first attempt is this:
$job = {Copy-Item -Path C:\Users\lscho\Desktop\quelle -Destination C:\Users\lscho\Desktop\ziel -Recurse -Force}
start-job -Name Kopieren -ScriptBlock $job
Do
{
âCoyp runsâ
Wait-Event -Timeout 1
}
Until (>>>>job is completed<<<<)
âCopy doneâ
pause
The >>>>job is completed<<<< is the problem, becasue i have no idea how to âimportâ the status of the job⌠or how to leave the dowhile.
is there anybody who has a clever idea?
thank you in advance!