title: How do find out short name of domain I'm in?
body: <p>I want to return the short name of the domain the computer I am running on. I do not want the <code>$env:USERDOMAIN</code> because that is the domain the user is logged on to, which could be different to the domain the machine is in. If I do</p>
  
  <p><code>(gwmi win32_computersystem).Domain</code></p>
  
  <p>This gets me the FQDN, but I want something similar to return the short name (NETBIOS name?). I am currently parsing the FQDN, but I know this will lead to bugs later.</p>
  
  <p>I don't have the Active Directory module installed, and company policy prevents me from installing it, so I can't simply use <code>(Get-ADDomain).NetBIOSName</code> from that module.</p>