i got this working by adding '$workstationsreal = $Using:workstationsreal' into scriptblock, thinking it becomes a global variable.
good news is that the main script spawns a separate powershell process when a selectioin is made in the listbox for $job to run but it still locks the GUI when i add a loop statement
good news is that the main script spawns a separate powershell process when a selectioin is made in the listbox for $job to run but it still locks the GUI when i add a loop statement
Statistics: Posted by monderick — Mon Jan 08, 2024 6:48 am