Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Using less than (

$
0
0

Hi Guys,

This has spun off another question I had asked in the in the group policy forum. However after more trouble shooting it is more appropriate to ask the question here. For background to the problem this is the original query

I can't post a link yet (waiting for account verification) so this the heading of the question which is located in the group policy forum:Using less than (<=) as part of WMI query for Client Side Targeting

When I run the following queries in PowerShell I am getting inconsistent results.

A result gets returned with the following query

Get-WmiObject -Query "SELECT name FROM Win32_ComputerSystem WHERE name >= '%[BAS]016'"

But no result gets returned when I use this one

Get-WmiObject -Query "SELECT name FROM Win32_ComputerSystem WHERE name < '%[BAS]016'"

This behaviour also occurs when trying to use the query as part of a group policy preference WMI query. So my question is why can't I use 'less than' < or 'less than or equal to' <= as part of a WMI query


Viewing all articles
Browse latest Browse all 15028

Trending Articles



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