In the result of AM Query on membership of Active Directory Group, there are some missing computers.
Example :
In Active Directory computer COMP1 is member of group TESTGRP1
An AM Query is created to return all computers membership of AD group TESTGRP1
But in the result of this AM Query, COMP1 is not present :
Client Automation - All Versions
In database, directory_url in table ca_discovered_hardware for missing computer contains a character ó
Example :
This SQL Query returns :
select directory_url from ca_discovered_hardware where host_name='COMP1'
ldap://xxxx.xxx/cn=comp1,ou=group with ó,ou=subgroup1,ou=group1,dc=xxxxx,dc=xxx
But in Active Directory, the OU name is : GROUP with o
Initially the OU name was GROUP with ó but it has been renamed as GROUP with o after.
Default Directory Synchronization" Job executes a LDAP query to search the computers with url stored in ca_discovered_hardware
LDAP search function returns OK (computer is found) because it considers the character o and ó as the same in the comparison.
So directory_url value in database is not updated and remains with ó character
AM Query does not consider both characters as the same and the computer is not returned by AM Query
Execute following SQL Query in database (DOMAIN and Enterprise) to replace character ó by o for computers with problem.
Example :
UPDATE ca_discovered_hardware
SET directory_url=REPLACE(directory_url, 'ó','o')
where directory_url like '%ou=group with ó,ou=subgroup1,ou=group1,dc=%'
Remarks :
- adapt '%ou=group with ó,ou=subgroup1,ou=group1,dc=%' by the correct Active Directory url
- Problem could also occur if a character o has been renamed as ó in Active Directory
In this case the query is :
UPDATE ca_discovered_hardware
SET directory_url=REPLACE(directory_url, ,'o', 'ó')
where directory_url like '%ou=group with o,ou=subgroup1,ou=group1,dc=%'