fn: sgnd_ad_current_netbios_domain
Purpose
Resolve the NetBIOS/short domain name for the currently joined Active Directory realm.
Arguments
- $1 Optional realm name. Defaults to the currently joined realm.
Output
Writes the short domain name, for example TESTADURA.
Returns
- 0 when the short domain name can be discovered; 1 otherwise.
Usage
workgroup="$(sgnd_ad_current_netbios_domain)" || return 1
