what command to check which domain you logon to
Determine machine's logon domain from command line. Trying to figure out if there is an environment variable or another method to get a given machine's logon domain from simple command line script. The variable %USERDOMAIN% will provide me with the domain my user is - and in a domain trsut scenario does not return the machine's domain, rather MY domain.