Search code examples
c#dnslogonserver

Get Domain LogonServer in C#


In a command prompt I am able to get the domain logon server by typing:

echo %logonserver%

How can I get this same result in C#?


Solution

  • System.Environment.GetEnvironmentVariable("logonserver")