> For the complete documentation index, see [llms.txt](https://watchdogsacademy.gitbook.io/attacking-active-directory/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://watchdogsacademy.gitbook.io/attacking-active-directory/user-enumeration-exploit/powerview/get-netgpo.md).

# Get-NetGPO

Group Policy Object (GPO) is a collection of Group Policy settings that defines what a system will look like and how it will behave for a defined group of users.import

```
Get-NetGPO
Get-NetGPO | Select displayname
Get-NetGPO -ComputerName yonrkers.north.newyork.local
Get-NetGPO -ComputerName bronx.north.newyork.local
Get-NetGPO -ComputerName nyc.newyork.local -Domain newyork.local
Get-NetGPO -ComputerName baltimore.maryland.local -Domain maryland.local
Get-NetGPO -ComputerName salisbury.maryland.local -Domain maryland.local
Get-NetGPO -ComputerName wsus.newyork.local -Domain newyork.local

#Get GPO(s) 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 salisbury.maryland.local



#Get machines where the given user is member of a specific group
Find-GPOLocation -UserName elena.lopez -Verbose 



```
