我尝试用WMI控制NLB。
WqlObjectQuery wql = new WqlObjectQuery (@"SELECT * FROM MicrosoftNLB_Node");
ManagementObjectSearcher search = new ManagementObjectSearcher(wql);
foreach (var obj in search.Get())
{
MessageBox.Show(obj.ToString());
}
我收到错误消息“无效的班级”
最佳答案
尝试这个:
ManagementObjectSearcher search = new ManagementObjectSearcher(
@"root\MicrosoftNLB",
@"SELECT * FROM MicrosoftNLB_Node");
foreach (var obj in search.Get())
{
MessageBox.Show(obj.ToString());
}
关于c# - 使用WMI C#控制Microsoft NLB,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8446177/