epoch71 Posted January 7, 2015 Report post Posted January 7, 2015 HiOur hardware inventory is extended to capture some registry values that contain company specific tags.However, on one of our images a value was missed (not present).I need to create a collection containing these machines, but I’m struggling to work out how to do this in WQL.Is it actually possible to use WQL to check if something does not exist (as opposed to being NULL)? Our environment is SCCM 2012 SP1 CU3. Thanks in advance. Quote Share this post Link to post Share on other sites More sharing options...
loewie1984 Posted January 7, 2015 Report post Posted January 7, 2015 Hi, This is what you are looking for: http://flylib.com/books/en/2.568.1.35/1/ From that post, use the following: SELECT * FROM RegistryValueChangeEvent WHERE Hive = 'HKEY_LOCAL_MACHINE' AND KeyPath = 'SOFTWARE\\MICROSOFT\\WBEM\\CIMOM' AND ValueName = 'Backup Interval Threshold' Cheers Rens! Quote Share this post Link to post Share on other sites More sharing options...
epoch71 Posted January 7, 2015 Report post Posted January 7, 2015 Hi Thanks for posting. However, I'm struggling to understand how this will work in our scenario: Registry key: HKLM\SOFTWARE\OurCompanyName Value: BuildVersion (REG_SZ) Data: BuildVersionTag (REG_SZ) The query-based collection I need to create is to be populated by machines which do have the above registry key, but the BuildVersion value and BuildVersionTag data are not present at all. Regards. Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted January 7, 2015 Report post Posted January 7, 2015 you need to use a subselect query. http://be.enhansoft.com/post/2014/09/17/The-Subselect-Query.aspx http://be.enhansoft.com/post/2014/09/24/Subselect-Query-for-SCCM-Queries-or-Collections-(WQL).aspx Quote Share this post Link to post Share on other sites More sharing options...
epoch71 Posted January 9, 2015 Report post Posted January 9, 2015 Thanks for your help. Quote Share this post Link to post Share on other sites More sharing options...