FQDN of a Windows Server in Domain using batch / cmd script
Quick one for you (and there’s probably easier ways of doing this)…only took ten minutes to work it out tho.
I needed to get the Fully Qualified Domain Name of a computer on the network into an environment variable in a batch script.
Here’s the code snippet: