Workflow Soluiton

 View Only
  • 1.  LDAP query in Workflow

    Posted Mar 06, 2012 02:28 PM

    Working on a way to manage computer objects in AD and I'm running into an issue where I can't get my LDAP query to run properly.  It's simple enough and runs fine in my LDAP query tool.

     

     The query in the object is: (&(objectCategory=computer)(name=[sWSName]))

    I beleve all my info to connect to AD is correct.  My ldap setup (if this tells you anything at all):

    WF Relevant log:
    LDAPErrorMessage = "LDAP Server server.domain.com:389 System.Runtime.InteropServices.COMException (0x80005000): Unknown error (0x80005000)

    Any ideas what I'm doing wrong?  Is there any more info I need to show you?



  • 2.  RE: LDAP query in Workflow

    Posted Mar 06, 2012 03:26 PM

    If it iis a Microsoft AD, you should be using the Active Directory components. The LDAP search stuff is deprecated, so you should avoid using them.

    If it is not and MS AD, try using the LDAP generator to create an LDAP component that returns the data you need. I created an LDAP generator to search the Employee ID Field since at the time there was no AD component to get that data back.

     

    rob



  • 3.  RE: LDAP query in Workflow

    Posted Mar 06, 2012 11:28 PM

    Well right from the horses mouth!  Good to know.  I wasn't aware that was deprecated.  This is for AD.  I was hoping to validate the OU a computer was in and if it wasn't either move it some how or delete it so the old workstation object didn't interfere with joining AD.  I don't see a way right now to do that.  That's what I was hoping to achieve. 



  • 4.  RE: LDAP query in Workflow

    Posted Mar 07, 2012 09:39 AM

    The AD components can do all this. Oddly, the Get Computer List does not include the DN of the computer (which would give you the info you need). BUT, the Get User Details will, and it works!

    The Get User Details component does not care what type of info you are looking up in AD, it will look up any SamAccountName - user or computer. Use that component, and then you can check the DN to see what OU the computer in in. You can then use the Move Object to Container to move the computer where ever you like.

    The other alternative is to use the LDAP generator to create a simple LDAP query that gets just the one field you need. But really, that is more work, the Get User Component works just fine.

    Rob