Obj 2 Enumeration

Task - Enumerate OU's and GPO's

Enumeration Cont.

List all Domain OU's

Get-DomainOU

List just the names of the OU's

Get-DomainOU | select -ExpandProperty name

List all computers in the StudentMachines OU

(Get-DomainOU -Identity StudentMachines).distinguishedname | %{Get-DomainComputer -SearchBase $_} | select name

List all the GPO's

Get-DomainGPO

List GPO applied to StudentMachines OU

(Get-DomainOU -Identity StudentMachines).gplink

We are looking for this [LDAP://cn={3E04167E-C2B6-4A9A-8FB7-C811158DC97C}

Get-DomainGPO -Identity '{3E04167E-C2B6-4A9A-8FB7-C811158DC97C}'

Last updated