assign a label for the AD OU that any machine belongs
How can I assign a label for the AD OU that any machine belongs to without causing a system performance problem?
We currently have more than 500 OUs that we target various group policy to and we would like to be able to target them that way in the K1000 as well. As I understand it, when a machine checks in, every smart label/ldap label is run against it. If I create an LDAP query for each OU, that means more than 500 indivdual SQL queries have to run every time a machine checks in which sounds bad to me. Is there any AUTOMATED way to set a field or label with the OU that machine is in without running 500 queries?
Answers (1)
I have a custom inventory rule that checks the OU. You can then create a label based off of that.
Custom inventory rule:
RegistryValueReturn(HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine, Distinguished-Name, TEXT)
Comments:
-
Thanks, I did not realise the OS was storing that there. Now the question is whether I can figure out how to remove the machine name from the Distinguished name and parse the rest of the OU. That probably has to be done in the SQL query. - nimexx 11 years ago
-
Im thinking along the lines of a single scheduled ticket rule that checks the OU and applies the correct labels for all machines rather than 500 smart label queries each containing some specific OU name. - nimexx 11 years ago