MachineInfo
Machine identity and server role.
Returned by machine_info. Identity comes from
the workstation service and the role fields from the server service. When the
server service is not running,
server_started is false,
comment is nil and every role field is
false; the identity fields are still populated.
Example
let machine = winnet.machine_info()
echo "$(machine.name) is running $(machine.version_major).$(machine.version_minor)"
if machine.domain_controller
echo "skipping: cannot unjoin a domain controller"
Fields
backup_domain_controller @ BoolWhether the machine advertises as a backup domain controller.
comment @ (Str | nil)Server comment.
domain @ StrDomain or workgroup the machine belongs to. Use
join_statusto tell which of the two it is.domain_controller @ BoolWhether the machine advertises as a domain controller.
name @ StrNetBIOS computer name.
server @ BoolWhether the machine advertises the server role.
server_started @ BoolWhether the server service supplied
server_typeandcomment.server_type @ ServerTypeAdvertised server role mask.
version_major @ IntMajor OS version.
version_minor @ IntMinor OS version.
workstation @ BoolWhether the machine advertises the workstation role.