Skip to content

GPO Functions

Your Name edited this page Mar 6, 2026 · 2 revisions

Get-DomainGPO

Description

Query for domain group policy objects.

Aliases

None

Syntax

PV > Get-DomainGPO
-Count         -Identity      -LDAPFilter    -NoCache       -NoVulnCheck   -NoWrap        -OutFile       -Properties    -Raw           -SearchBase    -Select        -Server        -SortBy        -TableView     -Where

Examples

PV > Get-DomainGPO
PV > Get-DomainGPO -Identity "Default Domain Policy"
PV > Get-DomainGPO -Properties displayname,gpcfilesyspath

Parameters

# With Argument
-Identity =
-Properties =
-LDAPFilter =
-SearchBase =
-Server =
-Select =
-Where =
-SortBy =
-OutFile =

# No Argument
-TableView
-Count
-NoWrap
-NoCache
-NoVulnCheck
-Raw

Get-DomainGPOLocalGroup

Description

Query all GPOs in a domain that modify local group memberships through Restricted Groups or Group Policy preferences.

Aliases

PV > Get-GPOLocalGroup

Syntax

PV > Get-DomainGPOLocalGroup
-Count         -Identity      -LDAPFilter    -NoWrap        -OutFile       -Select        -Server        -SortBy        -TableView     -Where

Examples

PV > Get-DomainGPOLocalGroup
PV > Get-DomainGPOLocalGroup -Identity "Default Domain Policy"

Parameters

# With Argument
-Identity =
-LDAPFilter =
-Server =
-Select =
-Where =
-SortBy =
-OutFile =

# No Argument
-TableView
-Count
-NoWrap

Get-DomainGPOSettings

Description

Query GPO settings including Group Policy preferences and scripts.

Aliases

PV > Get-GPOSettings

Syntax

PV > Get-DomainGPOSettings
-Count         -Identity      -NoCache       -NoVulnCheck   -NoWrap        -OutFile       -Properties    -Raw           -Select        -Server        -SortBy        -TableView     -Where

Examples

PV > Get-DomainGPOSettings -Identity "Default Domain Policy"

Parameters

# With Argument
-Identity =
-Properties =
-Server =
-Select =
-Where =
-SortBy =
-OutFile =

# No Argument
-TableView
-Count
-NoWrap
-NoCache
-NoVulnCheck
-Raw

Add-GPLink

Description

Create new GPO link to an OU.

Aliases

None

Syntax

PV > Add-GPLink
-Enforced            -GPOSearchBase       -GUID                -LinkEnabled         -OutFile             -Server              -TargetIdentity      -TargetSearchBase

Examples

PV > Add-GPLink -GUID "{31B2F340-016D-11D2-945F-00C04FB984F9}" -TargetIdentity "OU=IT,DC=domain,DC=local"

Parameters

# With Argument
-GUID = (required)
-TargetIdentity = (required)
-LinkEnabled = (Yes|No, default Yes)
-Enforced = (Yes|No, default No)
-TargetSearchBase =
-GPOSearchBase =
-Server =
-OutFile =

# No Argument

Remove-GPLink

Description

Remove GPO link from an OU.

Aliases

None

Syntax

PV > Remove-GPLink
-GPOSearchBase       -GUID                -OutFile             -Server              -TargetIdentity      -TargetSearchBase

Examples

PV > Remove-GPLink -GUID "{31B2F340-016D-11D2-945F-00C04FB984F9}" -TargetIdentity "OU=IT,DC=domain,DC=local"

Parameters

# With Argument
-GUID = (required)
-TargetIdentity = (required)
-TargetSearchBase =
-GPOSearchBase =
-Server =
-OutFile =

# No Argument

Add-DomainGPO

Description

Add new GPO object in AD.

Aliases

PV > Add-GPO

Syntax

PV > Add-DomainGPO
-BaseDN        -Description   -Identity      -LinkTo        -OutFile       -Server

Examples

PV > Add-DomainGPO -Identity "TestGPO"
PV > Add-DomainGPO -Identity "TestGPO" -LinkTo "OU=IT,DC=domain,DC=local"

Parameters

# With Argument
-Identity = (required)
-Description =
-LinkTo =
-BaseDN =
-Server =
-OutFile =

# No Argument

Getting Started

Use Cases

Available Modules

LDAP Operations
GPO
Computer Enumeration
ADCS
Exchange
Domain Trust
Service Accounts
Shadow Credentials
Misc

Web UI

Usage
API Documentation

Integrations

Sponsor

Clone this wiki locally