The Windows systeminfo command displays a lot of information! Use findstr to filter its output:
This can be used to semi-reliably determine if a machine is part of a domain.
(Non-AD joined machines will almost always use WORKGROUP for the Domain
, while AD-joined machines will often use a fully qualified DNS domain here.)