Excluding machines from a label
I've setup labels for my different locations at my company, all be different physical locations with their own subnets, and I need to exclude certain machines from these labels for the purpose of patching. I have specific machines that I do not want to apply updates to for various reasons. Anyone know of a way I can do this?
0 Comments
[ + ] Show comments
Answers (18)
Please log in to answer
Posted by:
GillySpy
13 years ago
Since you are using smart labels the only way to do it is to modify your existing smart labels to exclude other things (i.e. labels or machines) .
or
Problem: you are going to have to modify your smart labels any time your exclusion list changes:
The label way:
Let's say we have a label called "Exclude These" then you can permanently rewrite your smart labels to exclude this label. When you want to change which machines you are excluding you simply change membership in the "exclude these" label. To get more specific you could have separate exclusion lists like "exclude these from patching".
Here is what your other smart labels become:
Note: this is written for simplicity but not performance. You can add that above snippet to any label that identifies machines.
Note: If the "Exclude These" label is also a smart label then you must change the label order so that "Exclude these" runs first.
Note: when you change the membership of "exclude these" you must re-run an inventory on the affect PCs so they will update their smart labels.
and MACHINE.NAME != 'mycomputer'
and MACHINE.NAME != 'othercomputer'
etc.
or
...
and MACHINE.NAME NOT IN ('computer1', 'computer2')
Problem: you are going to have to modify your smart labels any time your exclusion list changes:
The label way:
Let's say we have a label called "Exclude These" then you can permanently rewrite your smart labels to exclude this label. When you want to change which machines you are excluding you simply change membership in the "exclude these" label. To get more specific you could have separate exclusion lists like "exclude these from patching".
Here is what your other smart labels become:
...
and MACHINE.ID NOT IN (select MACHINE_ID from MACHINE_LABEL_JT ML JOIN LABEL L ON L.NAME='Exclude These' and L.ID=LABEL_ID)
Note: this is written for simplicity but not performance. You can add that above snippet to any label that identifies machines.
Note: If the "Exclude These" label is also a smart label then you must change the label order so that "Exclude these" runs first.
Note: when you change the membership of "exclude these" you must re-run an inventory on the affect PCs so they will update their smart labels.
Posted by:
GillySpy
12 years ago
You can create a label X in the wizard using the criteria "does not contain" label Y. If label Y in this example is also a smart label then you will have to reorder the labels. Home->label->smart labels->change machine order. X would need a higher order than Y here.
I like the SQL cuz I understand it then I don't have to worry about edge cases the wizard cannot handle. I would vote for this:
http://kace.uservoice.com/forums/82699-k1000
I like the SQL cuz I understand it then I don't have to worry about edge cases the wizard cannot handle. I would vote for this:
http://kace.uservoice.com/forums/82699-k1000
Posted by:
GillySpy
12 years ago
So if I change my "exclude from patching" label to 99, and then recreate new smart labels using two criteria; label name contains <existing smart label> and label name does NOT contain <exclude from patching>, I should get the outcome I'm wanting
Yes, that should work. But I would leave the existing labels as is and make your new label 200. tip: You could make it 101 but future needs might get in the way so I leave a sizeable gap. There is no performance penalty in the gap since it's just an order not an iteration. When you create your label do a preview (test) to see if the data looks right.
By the way, could you give tme the specific suggestion number that you would vote for? I'm not sure which one you are referring to. THX.
Sorry I thought I did post that link:
http://kace.uservoice.com/forums/82699-k1000/suggestions/1791921-exclude-based-on-label
Posted by:
GillySpy
12 years ago
Posted by:
embryjim
12 years ago
Thanks for the reply, GillySpy (hey, that rhymes). Let me see if I understand this. Apparently the default order number is 100. So if I change my "exclude from patching" label to 99, and then recreate new smart labels using two criteria; label name contains <existing smart label> and label name does NOT contain <exclude from patching>, I should get the outcome I'm wanting.
By the way, could you give tme the specific suggestion number that you would vote for? I'm not sure which one you are referring to. THX.
By the way, could you give tme the specific suggestion number that you would vote for? I'm not sure which one you are referring to. THX.
Posted by:
steelc
13 years ago
Are you using a smart label to apply your labels? If so then perhaps you could modify the label to not include machines with another label attached.
For example, I have a smart label called Patch Production that applies to any machines that don't have "Patching" in their labels. This way I can apply either "No Patching" or "Test Patching" to a computer and they won't be included in the patch production schedule that is based on the Patch Production label.
For example, I have a smart label called Patch Production that applies to any machines that don't have "Patching" in their labels. This way I can apply either "No Patching" or "Test Patching" to a computer and they won't be included in the patch production schedule that is based on the Patch Production label.
Posted by:
kchase
13 years ago
Posted by:
steelc
13 years ago
Posted by:
embryjim
12 years ago
I also have this problem/issue. My organization has a very dynamic structure and uses the Kbox for inventory purposes, so the agent is on nearly all our 5000+ machines. HOWEVER, many are adamant about not wanting patching done on my schedule so they are requesting that I exclude machine A here, machine B there, this group of mahcines over here, etc. It's becoming an administrative nightmare. I have at least 25 smartlabels based on different criteria that encompass most of what I administer and have created an "exclude these" smart label. Alot of the machines share several different labels. I'm not at all versed in SQL, so my question is, can't there be something (like the old WSUS) where I can simply tell Kbox to exclude certain machines from patching without having to manipulate the SQL code? Has this already been addressed elsewhere? Or am I stuck learning SQL? Sorry to whine, but I like checkboxes that I can tick and be done with it!
Posted by:
embryjim
12 years ago
OK GS, thanks. That seems to take care of excluding machines that are in a certain label, but as it stands, I'm still stuck with manually modifying SQL to add machines to the exclusion label, Outside of SQL, what do you think would be a good way to automate this process? I'm thinking a simple "Add To <label>" button on the inventory page. Thoughts?
Posted by:
GillySpy
12 years ago
Posted by:
embryjim
12 years ago
OK! Now we're getting somewhere, just to clarify... if I have machines that can be in several different smart labels (domain name label plus subnet label plus building label, etc.) and I then add them to the "exclude from patching" label which has a lower order number (100, while the other labels have 200), they won't patch?
Posted by:
GillySpy
12 years ago
Posted by:
steelc
12 years ago
My setup is as follows:
Smart label with the following criteria:
If Label Name does not contain Patching apply "Patch Production"
You can make this with the wizard and not touch it.
I can then apply other labels to machines for various patching needs.
For instance:
No Patching is added to machines that Kace shouldn't update
Test Patching is applied to the machines that we apply patches to first
Lab Patching is applied to lab computers (different schedule from the rest of campus)
Special Lab Patching is applied to that special lab where the professor says we can only patch once a month
etc.
As long as the other labels contain the word Patching they will not get included in the default Patch Production label and will have their own patch schedule attached.
Smart label with the following criteria:
If Label Name does not contain Patching apply "Patch Production"
You can make this with the wizard and not touch it.
I can then apply other labels to machines for various patching needs.
For instance:
No Patching is added to machines that Kace shouldn't update
Test Patching is applied to the machines that we apply patches to first
Lab Patching is applied to lab computers (different schedule from the rest of campus)
Special Lab Patching is applied to that special lab where the professor says we can only patch once a month
etc.
As long as the other labels contain the word Patching they will not get included in the default Patch Production label and will have their own patch schedule attached.
Posted by:
embryjim
12 years ago
OK, GS thanks again. I ran into a liitle trouble in that my "exclude from patching" label is also a smart label and I wasn't able to search in Inventory and apply that label to certain machines (that label didn't show up in the APPLY THIS LABEL dropdown and DELL KACE support told me you cannot apply smart labels in that way). I do have enough descriptors on the machines I want to exclude (deep freeze, common txt file, etc.) that I can have it be a smart label and autopopulate (which is what I want). The DELL KACE guy was very helpful in helping me create a custom inventory rule that looks for the deep freeze path and I can push a text file to any other machine I want to exclude and add that to the inventory rule. Do you see a problem with this? That would make my final label something like this
Create new label C (order 100) with criteria of
Label name = A (order 100) AND
Label name = B (order 100) AND
Label name != EXCLUDE (order 50)
Patch using Label C (all are smart labels) and as long as a machine is in EXCLUDE, it won't patch even if it's also in A and/or B.
Steelc, thx for your input. I'm going to try and make this work unless it gets too complicated (too late huh?). Are your labels smart labels?
Create new label C (order 100) with criteria of
Label name = A (order 100) AND
Label name = B (order 100) AND
Label name != EXCLUDE (order 50)
Patch using Label C (all are smart labels) and as long as a machine is in EXCLUDE, it won't patch even if it's also in A and/or B.
Steelc, thx for your input. I'm going to try and make this work unless it gets too complicated (too late huh?). Are your labels smart labels?
Posted by:
GillySpy
12 years ago
Posted by:
steelc
12 years ago
ORIGINAL: embryjim
Steelc, thx for your input. I'm going to try and make this work unless it gets too complicated (too late huh?). Are your labels smart labels?
Some of the labels are smart and others aren't.
Someone (probably GillySpy) posted a great tip on how to "pre-populate" a smart label that has been very handy:
1. Create a normal label
2. Use an advanced search to find the computers you want to label
3. Apply the label from step 1 to computers found in step 2
4. Create a smart label that uses label created in step 1
The label will now be associated with the smart label from step 4, so you won't be able to manually add machines to it anymore, but those machines already labeled with it should retain it as long as they still meet the smart label requirements.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.