我使用Microsoft Bot Framework创建了一个Bot应用程序,并希望实现以下目标:
到目前为止,我一直关注着:
以下是我目前的代码:
WSManConnectionInfo connectioninfo = new WSManConnectionInfo();
connectioninfo.ComputerName = "<remote computer hostname>";
Runspace runspace = RunspaceFactory.CreateRunspace(connectioninfo);
//runspace.Open();
using (PowerShell ps = PowerShell.Create())
{
var re = ps.AddScript("Get-Service");
var results = re.Invoke();
}
答案 0 :(得分:1)