Skip to content

Instantly share code, notes, and snippets.

@spy86
Created January 15, 2019 12:54
Show Gist options
  • Save spy86/53385a836da9084223b0d4561cc6b343 to your computer and use it in GitHub Desktop.
Save spy86/53385a836da9084223b0d4561cc6b343 to your computer and use it in GitHub Desktop.
Check if server/computer are joined to domain
if ($env:computername -eq $env:userdomain) { echo " no AD domain" }
else { echo "must be in AD"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment