public static SystemState GetSystemState(ManagementScope scope, string serverName, string userName, string password, ILogger logger) { try { ManagementScope serverDefaultPath = WMIUtils.ConnectToServerDefaultPath(serverName, userName, password); return(SystemStateReader.GetSystemState(scope, serverDefaultPath, serverName, logger)); } catch (Exception ex) { logger.Verbose("Exception thrown getting the system state for server " + serverName + ". Exception: " + ex.Message, "SystemState"); throw; } }
public static SystemState GetSystemState(string serverName, string userName, string password, ILogger logger) { return(SystemStateReader.GetSystemState(WMIUtils.ConnectToServer(serverName, userName, password), serverName, userName, password, logger)); }