Skip to content

Instantly share code, notes, and snippets.

@HarmJ0y
Created August 16, 2017 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HarmJ0y/c5bf3e37192ba682de182c3b9b066b33 to your computer and use it in GitHub Desktop.
Save HarmJ0y/c5bf3e37192ba682de182c3b9b066b33 to your computer and use it in GitHub Desktop.
sample code for the second PowerView "power usage" post
gc computers.txt | Sort-Object -Unique | % {Get-DomainComputer -SearchBase "GC://$($ENV:USERDNSDOMAIN)" -LDAPFilter "(name=$_)" -Properties dnshostname}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment