Win PE Issue - Getting name of Domain Controller

aek

OSNN One Post Wonder
Joined
24 Mar 2005
Messages
1
have a LDAP query that I use to query AD. I query AD for a specific useraccoutnname in my Win PE environment. I query Ad while in winPE even before the machine gets ghosted and finally log into any domain.

I need to use the name of my DC in my LDAP query that queries AD because without that my query fails and gives Table Does not Exist message. Currently I have been hard coding the name of the Domain controller, and that works fine.

But can you get the name of the nearest AD Domain Controller, while in WinPE environment and before logging to any domain.

This is what I had tried, but did not work for me.

In my VB.Net Code modified for my WinPE Environment:
Set MyDomain = GetObject("LDAP://RootDSE")
MyDC = MyDomain.Get("dnsHostName")

The above query basically gives me the name of the DC.

I then tried to use this MyDC variable in my LDAP search but this did not work in WinPE environment. I still got the table does not exist message. (works fine from my machine on the domain as I am already logged on the domain).

Any thoughts or suggestions of getting the name of Domain Controller.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back