Re: Scripted LDAP Searches



On #2, you might also want to consider using the GPMC COM objects instead of trying to manage the linking manually. It has a facility for searching for the GPO, and then linking it to a container, and even setting it to the highest priority in the list. That may be easier than trying to manually manage that.

Darren

--
Darren Mar-Elia
MS-MVP-Windows Server--Group Policy
http://www.gpoguy.com -- The Windows Group Policy Information Hub:
FAQs, Training Videos, Whitepapers and Utilities for all things Group
Policy-related

Speed Group Policy Troubleshooting with the NEW GPHealth Reporter tool at http://www.sdmsoftware.com/products.php


"Joe Richards [MVP]" <humorexpress@xxxxxxxxxxx> wrote in message news:u7Rju1pOHHA.3268@xxxxxxxxxxxxxxxxxxxxxxx
1a. Return set order of objects is not guaranteed unless you have submitted a sort control (and it was accepted) for a given attribute.

1b. Return set order of the attributes of an object is never guaranteed.

1c. Return set order of the values of a multivalued attribute is never guaranteed.


2. The fact that a GPO exists in sysvol has no bearing on being able to link it when it comes to implementation details. The gplink attribute is a simple unicode string and you can put any old crap you want in it, it isn't validated. Your issue sounds like it is in finding the OU and I expect something isn't working as you think it is. Seeing the code may assist with this. Getting a network trace and looking at it will probably tell you immediately what the issue is. My expectation is that some form of referral or something else is occurring that you don't know about.


--
Joe Richards Microsoft MVP Windows Server Directory Services
Author of O'Reilly Active Directory Third Edition
www.joeware.net


---O'Reilly Active Directory Third Edition now available---

http://www.joeware.net/win/ad3e.htm


Keith wrote:
We have created a C# web application that creates an OU and sub-OUs per our standard structure, creates infrastructure groups for that OU, applies permissions to OU structure, and links GPOs that apply for that given domain\site...

We are seeing two things that i have questions about:
1) We search (LDAP) and add a domain level administrative group to a OU level group to give it rights to that OUs structure and objects. When running the application from our test server, and talking to the same domain controller in production (hard coded), the array order that is returned is different when running the application from production server. Why?

2) We search (LDAP) and link an existing GPO to one of our sub-OUs. When running the application from our test server, and talking to the same domain controller in production (hard coded), it finds the GPO and links successfully. When running the application from our production server it cannot find the GPO and function fails. They are talking to the same domain controller and we have confirmed that the GPO exists in SYSVOL on all the domain controllers (which should not matter since we hard coded the particular domain controller that we want to talk with)...thoughts???

.



Relevant Pages

  • Re: How many Global Catalog Servers are needed?
    ... Whatever DC is configured to be the PDC is used by the GPO editor as the GPO master. ... Author of O'Reilly Active Directory Third Edition ... Once this server goes down, users aren't get there Group Policies. ... You may cancel this operation for this session or retry using one of the following Domain Controller choices. ...
    (microsoft.public.win2000.active_directory)
  • Re: How many Global Catalog Servers are needed?
    ... my first DC is the GPO Master. ... I would like another server to hold ... Author of O'Reilly Active Directory Third Edition ... "The Domain Controller for Group Policy operations is not available. ...
    (microsoft.public.win2000.active_directory)
  • Re: GPO - Access denied after changing a GP setting
    ... You are about to restore Default Domain policy and Default domain Controller po ... This may render some server applications to fail. ... Unable to open the GPO due to access denied. ... You are about to restore Default Domain controller policy for the following domain ...
    (microsoft.public.windows.server.security)
  • Re: GPO - Access denied after changing a GP setting
    ... This may render some server applications to fail. ... y Unable to open the GPO due to access denied. ... This tool was unable to re-create the EFS Certificates in the Default D omain Policy GPO Access is denied. ... You are about to restore Default Domain controller policy for the following domain Do you want to continue: ...
    (microsoft.public.windows.server.security)
  • Re: Scripted LDAP Searches
    ... the application from our test server, and talking to the same domain ... controller in production, the array order that is returned is ... different when running the application from production server. ... We search and link an existing GPO to one of our sub-OUs. ...
    (microsoft.public.windows.server.active_directory)