rbennett806
Posts: 659
Score: 8 Joined: 6/14/2006 Status: offline
|
Well after a hard day chasing some code I think I've missed something, and I hope someone here can help me out. What I'm trying to do is to connect to Active Directory in order to verify some computer names. Now, the weird part is that I can get my VBScript code to work just fine on a machine running Windows XP bound to the domain, as well as on an XP machine not bound to the domain. What I CAN'T get it to do is to work when running from a Windows PE disc. I'm using Windows PE 2.0, which should have everything included in it to do LDAP queries, but I'm hitting a wall. The code that works perfectly fine on a machine not bound to the Active Directory domain is: strDomainController = "DomainControllerName.MyDomain.com" Set objNS = GetObject("LDAP:") Set objRootDSE = objNS.OpenDSObject("LDAP://" & strDomainController & "/RootDSE", providerAccount, providerPassword, ADS_SERVER_BIND Or ADS_SECURE_AUTHENTICATION) strDNSDomain = objRootDSE.Get("defaultNamingContext") And "providerAccount" is in the form of MyDomain\UserName, and "providerPassword" is the accompanying password. So when I run this script it's throwing up an error on the "GetObject" line. Does anyone have any thoughts on how to do an LDAP query from within Windows PE? Thanks!
|