[Logo] LDAPSoft LDAP And Active Directory Tools Community Forums
  [Search] Search   [Register] Register /  [Login] Login 
 
custom query  XML
Forum Index » General Discussion
Author Message
chrisT



Joined: 27/07/2010 14:33:52
Messages: 5
Offline

How do I build a report that queries a specific Organizational Unit and return all user objects that doesn't have a particular profilepath (eg. \\PATH\Profiles$\Workstations\TEST1) or a member of a certain AD group (eg. CN=List,OU=Recipients,OU=Exchange Migration,OU=Global,DC=L1,DC=COM )

Product: AD Admin Reporting Tool 5.2
support



Joined: 27/06/2008 19:01:18
Messages: 123
Offline

Following sql will generate a report from DC=LDAPSOFT,DC=COM and return all user object that doesn't have a profiepath of \\PATH\Profiles$\Workstations\TEST1 (Please note that you have to escape all \ with \\ as shown in the query) or a member of CN=List,OU=Recipients,OU=Exchange Migration,OU=Global,DC=LDAPSOFT,DC=COM

Select cn,sn from DC=LDAPSOFT,DC=COM where profilePath!='\\\\PATH\\Profiles$\\Workstations\\TEST1' or memberof='CN=List,OU=Recipients,OU=Exchange Migration,OU=Global,DC=LDAPSOFT,DC=COM' and objectCategory='person' and objectClass='user' and sAMAccountType!=805306370

Thanks
 
Forum Index » General Discussion
Go to:   
[Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing  
Powered by JForum 2.1.9 © JForum Team