Chris Nackers

ConfigMgr / SCCM

ConfigMgr 2012 - Collection Query With Special Characters

2013-12-12

From the archive (2013). Written for the tools of the time, so some details may be out of date.

Recently had an issue at a client site where we wanted to query for all user accounts with “_a” at the end of the account.  Attempting to query for this didn’t work as we were getting back accounts that just ended with “a”.  The Like statement was ”%_a”.

Turns out you need to put brackets around the underscore as it’s a special character.  So the proper query was ”%[_]a”.

Thanks to this post by John Nelson that pointed me on the right path.