我想在 PowerShell 中使用运行空间池来执行后台操作。但我需要从主线程访问 WPF 窗口变量。
普通运行空间有以下选项:
$runspace.SessionStateProxy.SetVariable('xamGUI',$xamGUI)
但是我如何对 RunspacePool 做同样的事情呢?
powershell runspace
powershell ×1
runspace ×1