摘要:
1、设置policy:Set-ExecutionPolicy Unrestricted2.添加引用 :C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0\System.Management.Automation.dll3.运行代码: Runspace runspace = RunspaceFactory.CreateRunspace(); runspace.Open(); RunspaceInvoke runspaceInvoker = new R... 阅读全文