Get windows domain name from the command line
Past couple of days, I have been hunting for the command that would give the domain that my computer is joined to. I have always been hitting the same page, and I am writing it here to no forget it.
Fyi, this command gives you the name of the domain that your computer is current joined to. That is, if you view the System Properties (sysdm.cpl), the Domain: value you see in there, that’s what this command gives you.