tailieunhanh - Active Directory Cookbook for windows server 2003- P12

Active Directory Cookbook for windows server 2003- P12:If you are familiar with the O'Reilly Cookbook format that can be seen in other popular books, such as the Perl Cookbook, Java Cookbook, and DNS and BIND Cookbook, then the layout of this book will not be anything new to you. The book is composed of 18 chapters, each containing 10-30 recipes for performing a specific Active Directory task. Within each recipe are four sections: problem, solution, discussion, and see also. | members based on certain criteria. Let s look at the LDAP search parameters for an attribute-scoped query Attribute Scoped Query Control Value The value to set for this control should be the multivalued DN attribute that you want to iterate over . member . Base DN This should be the DN of the object that contains the multivalued DN attribute . cn DomainAdmins cn users dc rallencorp dc com . Scope This should be set to Base. Filter The filter will match against objects defined in the Control Value. For example a filter of objectclass user objectcategory Person would match any user objects defined in the multivalued DN. You can also use any other attributes that are available with those objects. The following filter would match all user objects that have a department attribute equal to Sales objectclass user objectcategory Person department Sales Attributes This should contain the list of attributes to return for object matched in the multivalued DN. See Also MSDN Performing an Attribute Scoped Query and MSDN Searching with ActiveX Data Objects ADO Recipe Searching with a Bitwise Filter Problem You want to search against an attribute that contains a bit flag and you need to use a bitwise filter. Solution Using a graphical user interface 121 1. Follow the directions in Recipe for searching for objects. 2. For the Filter enter the bitwise expression such as the following which will find all universal groups objectclass group objectCategory group groupType . 8 3. Click Run. Using a command-line interface The following query finds universal groups using a bitwise OR filter dsquery cn users dc rallencorp dc com -scope subtree -attr name - filter RETURN objectclass group objectCategory group groupType 8 The following query finds disabled user accounts using a bitwise AND filter dsquery cn users dc rallencorp dc com -attr name -scope subtree - filter RETURN objectclass user .