brain dump far away from /dev/null

19Jan/121

How to determine your current logon server/domain controller on Windows 7/8/8.1

If you ever need to find your current logon server on Windows 7 (don't know by heart if it also works on XP), you can just run the following command on your command line:

1
echo %logonserver:*\\=%

UPDATE 2015-Jan-12: also works on Windows 8/8.1

%logonserver% is a local variable with a value that looks like \\domaincontroller. With :*\\= you can strip the leading backslashes and get only the hostname as a result. I have no clue about the value of the variable if you start your machine without a network connection or a connection to a domain controller. It's just a quick&dirty solution and in my case it does the job.

Comments (1) Trackbacks (0)
  1. Works fine on XP SP3.
    Nice tip, I didn’t know about the filter.


Leave a comment

No trackbacks yet.