manage objects and variables from another PowerShell runspace
问题 I am currently working with the System.Timers.Timer object in Powershell. The Problem i have encountered is, that when you register to the "Elapsed" event Register-ObjectEvent -InputObject $timer -EventName Elapsed -SourceIdentifier ThirtySecTimer -Action $scriptblock the scriptblock will run in a different Powershell Runspace / thread The problem here is, that i want to modify the timer object in the scriptblock and basically create a loop of shorter Intervals until it reaches x seconds and