How to know whether a server is Domain Controller or Member Server

As a administrator, we might need to distinguish a member server from Domain Controller. The same can be verified through a registry key.HKLM\System\CurrentControlSet\Control\ProductOptions\ProductType

If the value is

LanmanNT – Domain Controller
ServerNT – Member Server