Skip to content

Instantly share code, notes, and snippets.

@adamalbers
Created June 14, 2022 03:03
Show Gist options
  • Save adamalbers/a3f93b592dc88c2619611167ac12d80b to your computer and use it in GitHub Desktop.
Save adamalbers/a3f93b592dc88c2619611167ac12d80b to your computer and use it in GitHub Desktop.
For some reason there isn't an $Env: variable for the FQDN so this is the easiest way I've found to get it.
$fqdn = ([System.Net.Dns]::GetHostByName($env:computerName)).HostName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment