📄
Bufu-Sec Wiki
GithubTwitter
  • Bufu-Sec Wiki
  • Active Directory
    • General
      • General
      • Installation
      • DNS
      • Kerberos
      • Kerberos Delegation
    • Enumeration
      • AD Module
      • Bloodhound
      • PowerShell Cheatsheet
      • PowerView Cheatsheet
      • Users
      • Groups
      • Computers
      • OUs
      • GPOs
      • ACLs
      • Domains
      • Trusts
      • Forest Mappings
      • Files and Shares
      • Kerbrute
    • Privilege Escalation
      • Kerberoasting
      • AS-REP Roasting
      • Constrained Delegation
      • Unconstrained Delegation
      • DNS Admins
    • Lateral Movement
      • PS Remoting
      • Credential Dumping
      • DC Sync
      • Overpass the Hash
      • Ticket Harvesting
      • Pass the Ticket
    • Persistence
      • Golden Tickets
      • Silver Tickets
      • ACL Attacks
      • Custom SSPs
      • DC Shadow
      • Skeleton Key
      • DSRM
    • Trust Attacks
      • Cross Domain Attacks
      • Cross Forest Attacks
      • MSSQL Servers
    • MITM & Relay Attacks
      • LLMNR Poisoning
      • SMB Relay
      • IPv6 Attacks
    • Detection & Defense
      • Domain Admins
      • Architectural Changes
      • Microsoft ATA
Powered by GitBook
On this page
  • Get OUs in a Domain
  • Get GPO Applied on an OU (Read GPOName from Gplink Attribute from Get-NetOU)
  • Find All Computers in a given OU
  • Get the Logged on Users for All Machines in Any server OU in a Particular Domain
  1. Active Directory
  2. Enumeration

OUs

Get OUs in a Domain

# AD Module
Get-ADOrganizationalUnit -Filter * -Properties *

# PowerView
Get-NetOU -FullData

Get GPO Applied on an OU (Read GPOName from Gplink Attribute from Get-NetOU)

# AD Module
Get-GPO -GUID "AB306569-220D-43FF-B03B-83E8F4EF8081"

# PowerView
Get-NetGPO -GPOname "{AB306569-220D-43FF-B03B-83E8F4EF8081}"

Find All Computers in a given OU

Get-DomainComputer -SearchBase "ldap://OU=..."

Get the Logged on Users for All Machines in Any server OU in a Particular Domain

Get-DomainOU -Identity *server* -Domain <domain> | %{Get-DomainComputer -SearchBase $_.distinguishedname -Properties dnshostname | %{Get-NetLoggedOn -ComputerName $_}}
PreviousComputersNextGPOs

Last updated 2 years ago