Given this piece of code:
someobject.ProgressChanged += (sender, args) => Console.WriteLine(args.ProgressPercentage);
How could I write the same thing in powershell, i used Register-Event but when i called the execute method on the object it just blocks the thread and you only see that the event has fired after the action is finished, I also tried to use Start-Job.
Any ideas?