Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Using Parameters with the Get-WmiObject PowerShell Cmdlet

$
0
0

Summary: Use parameters with the Get-WmiObject cmdlet

Question: Which parameter of the Get-WMIObject cmdlet takes the place of a WQL where clause?

Answer: The filter parameter takes the place of the WQL where clause as shown here: 
Get-wmiobject win32_logicaldisk –filter “drivetype  =  3”

Question: Which parameter of the Get-WMIObject cmdlet takes the place of a WQL select statement?

Answer: The property parameter takes the place of the WQL select statement as shown here: 
Get-WmiObject  win32_bios -Property name, version

Question: Which parameter of the Get-WmiObject cmdlet permits you to use a native WQL query?

Answer: The query parameter of the Get-WmiObject cmdlet accepts a native WQL query as shown here:
Get-WmiObject -Query "Select name, version from win32_bios"


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>