26 August 2012

WMI Query


PowerShell v3:

Get-CimInstance -Query "SELECT * FROM Win32_Process WHERE Name Like 'power%'"

Get-CimInstance -Class Win32_Process -Filter "Name Like 'power%'"


PowerShell v2:

Get-WmiObject -Query "SELECT * FROM Win32_Process WHERE Name Like 'power%'"


for more information:

http://msdn.microsoft.com/en-us/library/ms186146(v=vs.80).aspx


No comments:

Post a Comment