Jan 202012
PowerTip of the Day, from PowerShell.com:
WMI is a great information resource, and Get-WmiObject makes it easy to retrieve WMI instances. First, use -List parameter to find WMI class names. For example, find classes that deal with network:
Get-WmiObject-ListWin32_*network*
Next, pick one of the classes and enumerate its instances:
Get-WmiObjectWin32_NetworkAdapterConfiguration
With WQL, a SQL-type query language for WMI, you can even create more sophisticated queries, such as:
Get-WmiObject-Query‘Select * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=True’
