internal static ServerMonitoringDetail GetAllServerDetailPVM(string Address, string UserName, string Password, string DatabaseName)
{
ServerMonitoringDetail objServerMonitoringDetails = new ServerMonitoringDetail();
try
{
ConnectionOptions options =
new ConnectionOptions();
options.Username = "Abhijit";
options.Password = "pass@123";
options.Impersonation = ImpersonationLevel.Anonymous;
options.Authority = "Connect";
options.EnablePrivileges = true;
options.Timeout = TimeSpan.MaxValue;
ManagementScope scope =
new ManagementScope(
"\\\\Abhijit\\root\\cimv2", options);
scope.Connect();
ObjectQuery query = new ObjectQuery(
"SELECT * FROM Win32_OperatingSystem");
ManagementObjectSearcher searcher =
new ManagementObjectSearcher(scope, query);
ManagementObjectCollection queryCollection = searcher.Get();
objServerMonitoringDetails.IpAddressMemory = Address;
}
catch (Exception ex)
{
ApplicationLog.WriteApplicationLog("GetAllServerDetailPVM", "ServerMonitoringDAL", "GetAllServerDetailPVM", "ServerMonitoringTool", "Error Details :-" + ex.Message);
}
return objServerMonitoringDetails;
}