Skip to main content
Code and think

PowerShell Retrieve FQDN

If you need Fully Qualified Domain Name of a Windows computer you execute the following command from PowerShell: [System.Net.Dns]::GetHostByName($env:ComputerName).HostName.