在C#中获取域LogonServer

Ray*_*sen 1 c# dns logonserver

在命令提示符中,我可以通过键入以下内容来获取域登录服务​​器:

echo %logonserver%
Run Code Online (Sandbox Code Playgroud)

如何在C#中获得相同的结果?

Dav*_*kle 6

System.Environment.GetEnvironmentVariable( "LOGONSERVER")