public void SetWMIScopeCIMv2(Server server) { /* if (workgroupComputer) { this.options.Authority = "NTLMDomain:" + server.ComputerName; } else { this.options.Authority = "NTLMDomain:" + this.domain; } */ // WMI connection string for \root\cimv2 wmiScope = new ManagementScope("\\\\" + server.ComputerName + "\\root\\cimv2", this.options); }
private void addServerToDataGridView(Server server) { int nextRow = dataGridView1.Rows.Count; dataGridView1.Rows.Add(); dataGridView1.Rows[nextRow].Cells["ComputerName"].Value = server.ComputerName; dataGridView1.Rows[nextRow].Cells["OSArch"].Value = server.OSArch; dataGridView1.Rows[nextRow].Cells["ZabbixAgentVersion"].Value = server.ZabbixAgentVersion; dataGridView1.Rows[nextRow].Cells["ZabbixServiceState"].Value = server.ZabbixServiceState; dataGridView1.Rows[nextRow].Cells["StatusOfLastAction"].Value = server.StatusOfLastAction; }