public ManagementScope GetScope(WindowsServer srv) { ConnectionOptions options = new ConnectionOptions(); options.Impersonation = ImpersonationLevel.Impersonate; if (!srv.IsDomainAuth) { options.Username = srv.Login; options.Password = srv.Pass; } ManagementScope scope = new ManagementScope("\\\\" + srv.Address + "\\root\\cimv2", options); scope.Connect(); return(scope); }
public void DeleteServer(WindowsServer srv) { WindowsSrvs.Remove(srv); SaveConf(); }
public void AddNewServer(WindowsServer srv) { WindowsSrvs.Add(srv); SaveConf(); }