# GPO  Enumeration

### **Get list of GPO's in the current domain**

```
Get-NetGPO
Get-NetGPO -Computername <computername>
```

### **Get GPO's which uses restricteds 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 <computername>
```

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

```
Find-GPOLocation -Username student244 -Verbose
```

### **Get OU's in a domain**

```
Get-NetOU -Fulldata
```

### **Get machines that are part of an OU**

```
Get-NetOU StudentMachines | %{Get-NetComputer -ADSPath $_}
```

### **Get GPO applied on an OU**

gplink from Get-NetOU -Fulldata

```
Get-NetGPO -GPOname "{<gplink>}"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://crtp-certification.certs-study.com/domain-enumeration/gpo-enumeration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
