C# 从Linux c获取在远程windows计算机上运行的进程
我已经尝试了一段时间,在谷歌上搜索了很多,但都找不到合适的支持。 在Mon上运行基于.Net的项目,并尝试获取在远程windows计算机上运行的进程id。不能继续下去。。。 在 scope.Options=connectoptionsC# 从Linux c获取在远程windows计算机上运行的进程,c#,exception,mono,notimplementedexception,C#,Exception,Mono,Notimplementedexception,我已经尝试了一段时间,在谷歌上搜索了很多,但都找不到合适的支持。 在Mon上运行基于.Net的项目,并尝试获取在远程windows计算机上运行的进程id。不能继续下去。。。 在 scope.Options=connectoptions 我收到System.NotImplemented异常。想知道MONO是否真的支持这个吗 ManagementScope类中未实现任何内容: System.Management/System.Management/ManagementScope.cs 参考: Co
我收到System.NotImplemented异常。想知道MONO是否真的支持这个吗 ManagementScope类中未实现任何内容: System.Management/System.Management/ManagementScope.cs 参考:
ConnectionOptions connectoptions = new ConnectionOptions();
string ipAddress = "XX.XX.X.XXX";
ManagementScope scope = new ManagementScope(@"\\" + ipAddress + @"\root\cimv2", connectoptions);
scope.Options = connectoptions;
var query = new SelectQuery("select * from Win32_process where name = '" + ProcessName + "'");
List<int> EPids = new List<int>();
using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query))
{
foreach (ManagementObject EProcess in searcher.Get())
{
var pId = Convert.ToInt32(EngineProcess["ProcessId"]);
EnginePids.Add(pId);
Console.WriteLine(pId);
}
}
return EPids.ToArray();
public ConnectionOptions Options {
[MonoTODO]
get {
throw new NotImplementedException ();
}
[MonoTODO]
set {
throw new NotImplementedException ();
}
}