Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/329.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 从Linux c获取在远程windows计算机上运行的进程_C#_Exception_Mono_Notimplementedexception - Fatal编程技术网

C# 从Linux c获取在远程windows计算机上运行的进程

C# 从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

我已经尝试了一段时间,在谷歌上搜索了很多,但都找不到合适的支持。 在Mon上运行基于.Net的项目,并尝试获取在远程windows计算机上运行的进程id。不能继续下去。。。

scope.Options=connectoptions


我收到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 ();
   }
}