IQueryable Interface Implementation for Windows Management Instrumentation.
The project represents main WMI Queryable library that provides base WMI context object, attributes, exception classes and interfaces.
The projects provide WMI translation functionality.
https://www.nuget.org/packages/VNetDev.WmiQueryableCore.WqlTranslator/
This project contains a set of interfaces represent WqlTranslator object and its elements.
https://www.nuget.org/packages/VNetDev.WmiQueryableCore.WqlTranslator.Abstraction/
The WMI Queryable driver provides communication over WinRM protocol.
https://www.nuget.org/packages/VNetDev.WmiQueryableCore.Cim/
The WMI Queryable driver provides communication over DCom.
https://www.nuget.org/packages/VNetDev.WmiQueryableCore.DCom/
The project that extends Base WMI context class by implementing all the classes provided in Windows default WMI namespace "root\CIMV2".
https://www.nuget.org/packages/VNetDev.WmiQueryableCore.CIMv2/
The project that extends Base WMI context class by implementing all the classes provided in Microsoft Endpoint Configuration Manager version 2002.
https://www.nuget.org/packages/VNetDev.WmiQueryableCore.Sms/
var context = new CIMv2WmiContext(); context.Configure(x => x.UseDCom());var context = new CIMv2WmiContext(); context.Configure(x => x.UseCim());var context = new CIMv2WmiContext(); context.Configure(x => x.UseCim( "RemoteComputerNameOrIp", "root\\CIMV2", PasswordAuthenticationMechanism.Default, "domain.local", "AdminUserName", "Password123"));services.AddWmiContext<WmiContext>(options => options.UseCim());foreach (var process in context.Win32Process .Where(p => p.Name.StartsWith("calc"))) { Console.WriteLine($"Found '{process.Name}' process[{process.ProcessId}]! Terminating..."); process.Terminate(); }foreach (var entity in context.Win32PnPEntity .Where(e => e.ConfigManagerErrorCode != 0)) { Console.WriteLine($"Device {entity.Name} has an issue."); }Win32Process.Create(context, "calc.exe");[WmiClass(Name = "Win32_Process")] public class Win32CustomProcess { [WmiProperty(Name = "ProcessID")] public uint Pid { get; set; } public string Name { get; set; } }public class CustomWmiContext : WmiContext { public WmiClassSet<Win32CustomProcess> Processes { get; set; } public CustomWmiContext() { } public CustomWmiContext(WmiContextOptions options) : base(options) { } }