Hi All,
Below is the sample script for that. Run this in your local desktop.
$server=hostname
[String]$ServerName=[System.Net.Dns]::GetHostEntry([string]$Server).HostName
$ServerName
If you want to know about remote servers, use the invoke-command command let.
Regards,
Chaitanya