{"id":8361,"date":"2012-08-09T11:59:00","date_gmt":"2012-08-09T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2012\/08\/09\/powertip-using-parameters-with-the-get-wmiobject-powershell-cmdlet\/"},"modified":"2012-08-09T11:59:00","modified_gmt":"2012-08-09T11:59:00","slug":"powertip-using-parameters-with-the-get-wmiobject-powershell-cmdlet","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-using-parameters-with-the-get-wmiobject-powershell-cmdlet\/","title":{"rendered":"PowerTip: Using Parameters with the Get-WmiObject PowerShell Cmdlet"},"content":{"rendered":"<p><strong>Summary<\/strong>:&nbsp;Use parameters with the Get-WmiObject cmdlet\n<b>Question<\/b>: Which parameter of the&nbsp;<b>Get-WMIObject<\/b>&nbsp;cmdlet takes the place of a WQL where clause?<\/p>\n<p style=\"padding-left: 30px\"><b>Answer<\/b>: The&nbsp;<b>filter<\/b>&nbsp;parameter takes the place of the WQL where clause as shown here:&nbsp;<br \/>Get-wmiobject win32_logicaldisk &ndash;filter &ldquo;drivetype&nbsp; =&nbsp; 3&rdquo;\n<b>Question<\/b>: Which parameter of the&nbsp;<b>Get-WMIObject<\/b>&nbsp;cmdlet takes the place of a WQL select statement?<\/p>\n<p style=\"padding-left: 30px\"><b>Answer<\/b>: The&nbsp;<b>property<\/b>&nbsp;parameter takes the place of the WQL select statement as shown here:&nbsp;<br \/>Get-WmiObject &nbsp;win32_bios -Property name, version\n<b>Question<\/b>: Which parameter of the&nbsp;<b>Get-WmiObject<\/b>&nbsp;cmdlet permits you to use a native WQL query?<\/p>\n<p style=\"padding-left: 30px\"><b>Answer<\/b>: The&nbsp;<b>query<\/b>&nbsp;parameter of the&nbsp;<b>Get-WmiObject<\/b>&nbsp;cmdlet accepts a native WQL query as shown here: <br \/>Get-WmiObject -Query &#8220;Select name, version from win32_bios&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary:&nbsp;Use parameters with the Get-WmiObject cmdlet Question: Which parameter of the&nbsp;Get-WMIObject&nbsp;cmdlet takes the place of a WQL where clause? Answer: The&nbsp;filter&nbsp;parameter takes the place of the WQL where clause as shown here:&nbsp;Get-wmiobject win32_logicaldisk &ndash;filter &ldquo;drivetype&nbsp; =&nbsp; 3&rdquo; Question: Which parameter of the&nbsp;Get-WMIObject&nbsp;cmdlet takes the place of a WQL select statement? Answer: The&nbsp;property&nbsp;parameter takes the place [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[356,3,45],"class_list":["post-8361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-powertip","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary:&nbsp;Use parameters with the Get-WmiObject cmdlet Question: Which parameter of the&nbsp;Get-WMIObject&nbsp;cmdlet takes the place of a WQL where clause? Answer: The&nbsp;filter&nbsp;parameter takes the place of the WQL where clause as shown here:&nbsp;Get-wmiobject win32_logicaldisk &ndash;filter &ldquo;drivetype&nbsp; =&nbsp; 3&rdquo; Question: Which parameter of the&nbsp;Get-WMIObject&nbsp;cmdlet takes the place of a WQL select statement? Answer: The&nbsp;property&nbsp;parameter takes the place [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/8361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=8361"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/8361\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=8361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=8361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=8361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}