Software Deployment Question
Try to excempt Computers of a certain AD group
I like to do have a label which includes all systems which names are starting with "PC" but are not part of the AD Group "Excemption"
I have a smart label in place named all PCs with this SQL Code:
SELECT MACHINE.NAME AS SYSTEM_NAME, SYSTEM_DESCRIPTION, MACHINE.IP, MACHINE.MAC, MACHINE.ID as TOPIC_ID FROM MACHINE WHERE ((MACHINE.NAME like 'PC%'))
This one is connected with a label named All_PCs, is used to manage the patching and is working quite fine.
Now I have to excempt some PCs from this patching process. I created an AD group with the PCs to excempt in it named "Excemptions"
Now I changed my Code to:
SELECT MACHINE.NAME AS SYSTEM_NAME, SYSTEM_DESCRIPTION, MACHINE.IP, MACHINE.MAC, MACHINE.ID as TOPIC_ID FROM MACHINE WHERE ((MACHINE.NAME like 'PC%') AND ((not exists (select 1 from LABEL, MACHINE_LABEL_JT where MACHINE.ID = MACHINE_LABEL_JT.MACHINE_ID AND MACHINE_LABEL_JT.LABEL_ID = LABEL.ID AND LABEL.TYPE <> 'hidden' and LABEL.NAME = 'Excemptions')) ))
This is not working. Can someone please give me hint how to correct it?