/build/static/layout/Breadcrumb_cap_w.png

Try to excempt Computers of a certain AD group


Hi Everyone,


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?


Thank you



2 Comments   [ + ] Show comments
  • Decrease the value of the smart label order for the 'Excemptions' label. - flip1001 4 years ago
  • Smart Labels have an Order value? Where can I see/modify this?
    I only see the typ of the label, to which label the smart label is assosiated and the sql behind the smart label - anonymous_150868 4 years ago

Answers (1)

Posted by: anonymous_150868 4 years ago
White Belt
0

I have tested your code and is working well.

Please check if all the Clients did an inventory? Smartlabels are assigned only after an inventory of the affected client


Cheers

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ