Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
This code replaces a computer account from one Active Directory OU to: \test.dom.company.com\RIS Computers\
AddExtender("wwads34I.dll") logonserver="d-pdcsrv" computername="pcdtnws293" dsSetCredentx("userid@test.dom.company.com", "password",1|256) lpath = dsFindPath("LDAP://%logonserver%","CN=%computername%") RISComputerOU = "LDAP://%logonserver%/OU=RIS Computers,DC=test,DC=dom,DC=company,DC=com" RISComputerPath = "LDAP://%logonserver%/CN=%computername%,OU=RIS Computers,DC=test,DC=dom,DC=company,DC=com" sNewPath = dsMoveObj(lpath, RISComputerOU, "CN=%computername%") Display(3,"%computername%", sNewPath)
The extender uses OS functionality to validate and parse ADSI paths. If memory servers, that functionality is not part of the main ADSI dll but in one of the axillary ADSI dlls. It is possible that your WinPE does not have the dll installed.
You may be able to work around this by using WB's COM sub-system to perform your AD tasks.
Here is a simple example to try
; Get the LDAP object. objLdap = ObjectGet("LDAP:") ; Get the container object objContainer = objLdap.OpenDSObject("LDAP://shamrock/OU=Test Org Unit,DC=jclass,DC=org","me@jclass.org", "*topsecret*", 1) ; Move it objComputer = objContainer.MoveHere("LDAP://shamrock/CN=TestComputer,CN=Computers,DC=jclass,DC=org", "CN=Computers") Message("Computer path", objComputer.AdsPath) ; Clean up objComputer = 0 objContainer = 0 objLdap = 0
/i386/system32/*.* activeds.tlb adsiis51.dll adsldp.dll adsldpc.dll adsmsext.dll adsnds.dll adsnt.dll adsnw.dll rassapi.dllYou can get them from the Windows XP SP2 cd or computer.
Article ID: W16787
File Created: 2007:07:03:14:26:16
Last Updated: 2007:07:03:14:26:16