I know I can use platform.node() to get my computer's network name:
>>> import platform >>> platform.node() 'MyComputerName'
But what I really want is something that will work similar to the following:
>>> get_full_network_domain_name() 'MyComputerName.it.na.mycompany.com'
Does something like this exist?
To find the FQDN On the Windows Taskbar, click Start > Programs > Administrative Tools > Active Directory Domains and Trusts. In the left pane of the Active Directory Domains and Trusts dialog box, look under Active Directory Domains and Trusts. The FQDN for the computer or computers is listed.
A fully qualified domain name (FQDN) is the complete domain name for a specific computer, or host, on the internet. The FQDN consists of two parts: the hostname and the domain name. For example, an FQDN for a hypothetical mail server might be mymail.somecollege.edu .
The fully qualified domain name is returned by socket.getfqdn()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With