wmi远程查询:绑定源ip还是使用ip proxy?

时间:2014-02-14 16:13:27

标签: c# .net network-programming wmi wmi-query

这是一个与远程主机的WMI连接的简单示例:

string FullComputerPathName=@"\\mycomputer\root\cimv2";

ConnectionOptions options = new ConnectionOptions();
options.Password = "some_password";
options.Username = "some_user";

ManagementScope scope = new ManagementScope(FullComputerPathName,options);
scope.Connect();

是否有机会选择其中一种选择:

1) 使用IP代理到达远程主机。 示例(类似这样):

ManagementScope scope = new ManagementScope(FullComputerPathName,options);
**scope.ProxyIP = myIPaddress**
scope.Connect();

2) 在WMI连接上指定源ip。 示例(类似这样):

ManagementScope scope = new ManagementScope(FullComputerPathName,options);
**scope.Connection.SourceIP = myIPaddress**
scope.Connect();

提前感谢任何提示!

0 个答案:

没有答案