Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
Use PowerShell to run WQL.
July 29, 2014
Q: How can I use PowerShell to query WMI Query Language?
A: If you want to use PowerShell to run a WMI Query Language (WQL) statement, you can use the following approach in which you replace $query with your own WQL statement:
$query = 'select TotalPhysicalMemory from Win32_ComputerSystem'get-wmiobject -query $query -Namespace "rootCIMV2"
You May Also Like