> For the complete documentation index, see [llms.txt](https://aidenpearce369.gitbook.io/handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aidenpearce369.gitbook.io/handbook/ad-pentesting/ad-enumeration/enumerating-gpos.md).

# Enumerating GPOs

### PowerView

Get list of GPOs of current domain

```
Get-NetGPO
```

Get list of GPOs of another domain

```
Get-NetGPO -Domain <DOMAIN NAME>
```

Get list of GPO names of current domain

```
Get-NetGPO | Select displayname
```

Get list of GPO names of another domain

```
Get-NetGPO -Domain <DOMAIN NAME> | Select displayname
```

Get GPO applied on a specific OU with gplink

```
(Get-NetOU <OU NAME> -FullData).gplink.split(";")[0] -replace "^." | %{Get-NetGPO -ADSpath $_ }
```

Get resultant set of GPO policies

```
gpresult /R
```

Get GPOs which use restricted groups or groups.xml for interesting users

```
Get-NetGPOGroup
```

Get users which are in a local group of a machine using GPO

```
Find-GPOComputerAdmin -Computername <COMPUTER NAME>
```

Get machines where the given user is member of a specific group

```
Find-GPOLocation -Username <USERNAME> 
```

Get GPO applied on an OU

```
Get-NetGPO -GPOName "{Gplink of OU}"
```

### Active Directory Module

Get list of GPOs of current domain

```
Get-GPO -All
```

Get resultant set of GPOs of current domain

```
Get-GPResultantSetOfPolicy -ReportType HTML -Path <PATH TO REPORT>
```

Get GPO applied on an OU

```
Get-GPO -Guid <Gplink of OU>
```
