SCCM Query Per Computer Name
I've been creating collections under my SCCM Console and successfully have done two queries where the first is based on the computer account object OUs. Then the other generates a collection that contains only laptop devices.
Does anyone know of a query that will generate a collection by only picking out a certain part of a computer name? Per say under an OU there are several computers names as followed; SYS-BSC-2FJ4L5S, SYS-IS-FBQM1NM and SYS-CH-G2BM45S. If I want to start a collection that will only contain computers from the BSC department, is there a way for a query to only pick out all computers that contains SYS-BSC-"%" ? Please advise.
this will look for bsc in the name:
SELECT SYSTEM_DESCRIPTION, MACHINE.NAME AS SYSTEM_NAME FROM MACHINE WHERE (MACHINE.NAME like '%bsc%') ORDER BY SYSTEM_DESCRIPTION
this looks for names starting with sys-bsc
SELECT SYSTEM_DESCRIPTION, MACHINE.NAME AS SYSTEM_NAME FROM MACHINE WHERE (MACHINE.NAME like 'sys-bsc%') ORDER BY SYSTEM_NAME
My SQL knowledge is super old, but try something like this in the SQL statement - just clone/edit the one to have working.
Select Computer.Name.Table.Whatever Where Computer.Name is LIKE "SYS%"
I dont know if its single or double quotes, hope you get what I mean. You need to use the LIKE with some wildcards. Hopefully someone else who knows SQL will be able to help.
*told you m sql was bad (;