class Program
{
static void Main()
{
ManagementScope scope = new ManagementScope("\\\\172.29.0.213"); //LONRMS0028
scope.Connect();
ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_Process");
ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);
foreach (ManagementObject oReturn in searcher.Get())
{
string state = oReturn.Properties["State"].Value.ToString().Trim();
}
}
}
No comments:
Post a Comment