A host which part of Active directory domain does authentication from the logon server (domain controller).
LOGONSERVER env var has its value.
C:>echo %LOGONSERVER% \PUN5OPSDIRPIN01
Is there any API using which I can retrieve this value?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
Nearly every language or framework will have a method that will let you retrive the values of environment variables. .NET, Powershell, Java... What are you coding in?
$env:<name of env variable>, so for example
WMI (using VBS):
Set colItems = objWMIService.ExecQuery(”Select * from Win32_Environment”)
Assuming you want to retrieve that from the client, you could query "HKCU:\Volatile Environment\LOGONSERVER" or env:LOGONSERVER.