• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Win PE Issue - Getting name of Domain Controller

aek

OSNN One Post Wonder
#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 posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,014
Latest member
sanoravies