Skip to content

Instantly share code, notes, and snippets.

@reybango
Last active February 18, 2021 01:34
Show Gist options
  • Save reybango/537dd185bed45fb0a6467d3b771fae69 to your computer and use it in GitHub Desktop.
Save reybango/537dd185bed45fb0a6467d3b771fae69 to your computer and use it in GitHub Desktop.
# Get all user objects in the specific domain and only print the AD username
get-netuser -domain throwback.local -domaincontroller 10.200.14.117 | select samaccountname
# Get all computer objects in the specific domain
get-netcomputer -domain throwback.local -domaincontroller 10.200.14.117
# Get all domain trusts
Get-NetDomainTrust -domain throwback.local -domaincontroller 10.200.14.117
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment