HallX Posted October 21, 2014 Posted October 21, 2014 Hi All Is it possible to have an "OR" variable in a WMI filter and, if so, what syntax should be used. My current filter syntax is: Select name from Win32_ComputerSystem WHERE name LIKE "%T2-%" so any computer named T2- applies the filter. I also want computers named T3- and T4- to apply the same filter, can this be done? Paul
Steve21 Posted October 21, 2014 Posted October 21, 2014 Like these? select * from Win32_OperatingSystem where (ProductType = "2") OR (ProductType = "3") AND OSArchitecture = "64-bit" Steve
HallX Posted October 21, 2014 Author Posted October 21, 2014 @Steve21 So would the syntax be: Select name from Win32_ComputerSystem WHERE (name LIKE "%T2-%") OR (name LIKE "%T3-%") OR (name LIKE "%T4-%")
Steve21 Posted October 21, 2014 Posted October 21, 2014 Aye but can't you just use: Select name from Win32_ComputerSystem WHERE name LIKE "T[2-4]-%" If it's only 2-4 etc Steve 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now