使用这里的程序:http://www.codeproject.com/Articles/18409/Asynchronously-Execute-PowerShell-Scripts-from-C
我遇到了错误: Error in Script: System.Management.Automation.CmdletInvocationException: Cannot invoke this function because the current host does not implement it. ---> System.Management.Automation.Host.HostException: Cannot Invoke this function because the current host does not implement it.
当我使用一个本地服务器bin中的脚本时,例如只需要输入以下命令:
get-serverlist "property group" ServerRange | CollectPerfData.ps1*