Last active
December 15, 2015 09:39
-
-
Save flickerfly/5240058 to your computer and use it in GitHub Desktop.
Get the name of the domain I'm on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Put the domain of the computer this script is running on into the $domain variable | |
$domain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().Name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alternate: [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().ToString()