Admin Tip #146: UserDNSDomain environment variable set if a computer is a logged on to a domain

Hits: Failed to execute CGI : Win32 Error Code = 3



The title says it all. If you want to know whether and what domain a computer is logged onto, the UserDNSDomain environment variable will tell you. The nice thing is that you can use the environmental variable in automation scripts where you want to do different things depending on which domain a computer is logged onto.