-
-
Notifications
You must be signed in to change notification settings - Fork 97
GPO Functions
Your Name edited this page Mar 6, 2026
·
2 revisions
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 -WhereExamples
PV > Get-DomainGPO
PV > Get-DomainGPO -Identity "Default Domain Policy"
PV > Get-DomainGPO -Properties displayname,gpcfilesyspathParameters
# With Argument
-Identity =
-Properties =
-LDAPFilter =
-SearchBase =
-Server =
-Select =
-Where =
-SortBy =
-OutFile =
# No Argument
-TableView
-Count
-NoWrap
-NoCache
-NoVulnCheck
-RawDescription
Query all GPOs in a domain that modify local group memberships through Restricted Groups or Group Policy preferences.
Aliases
PV > Get-GPOLocalGroupSyntax
PV > Get-DomainGPOLocalGroup
-Count -Identity -LDAPFilter -NoWrap -OutFile -Select -Server -SortBy -TableView -WhereExamples
PV > Get-DomainGPOLocalGroup
PV > Get-DomainGPOLocalGroup -Identity "Default Domain Policy"Parameters
# With Argument
-Identity =
-LDAPFilter =
-Server =
-Select =
-Where =
-SortBy =
-OutFile =
# No Argument
-TableView
-Count
-NoWrapDescription
Query GPO settings including Group Policy preferences and scripts.
Aliases
PV > Get-GPOSettingsSyntax
PV > Get-DomainGPOSettings
-Count -Identity -NoCache -NoVulnCheck -NoWrap -OutFile -Properties -Raw -Select -Server -SortBy -TableView -WhereExamples
PV > Get-DomainGPOSettings -Identity "Default Domain Policy"Parameters
# With Argument
-Identity =
-Properties =
-Server =
-Select =
-Where =
-SortBy =
-OutFile =
# No Argument
-TableView
-Count
-NoWrap
-NoCache
-NoVulnCheck
-RawDescription
Create new GPO link to an OU.
Aliases
None
Syntax
PV > Add-GPLink
-Enforced -GPOSearchBase -GUID -LinkEnabled -OutFile -Server -TargetIdentity -TargetSearchBaseExamples
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 ArgumentDescription
Remove GPO link from an OU.
Aliases
None
Syntax
PV > Remove-GPLink
-GPOSearchBase -GUID -OutFile -Server -TargetIdentity -TargetSearchBaseExamples
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 ArgumentDescription
Add new GPO object in AD.
Aliases
PV > Add-GPOSyntax
PV > Add-DomainGPO
-BaseDN -Description -Identity -LinkTo -OutFile -ServerExamples
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
- Introduction
- Installation
- Supported Authentication
- Cheatsheets
- Obfuscation
- User Defined Rules
- Public Writeups
LDAP Operations
- Get-DomainUser
- Get-DomainComputer
- Get-DomainGroup
- Get-DomainGroupMember
- Get-DomainOU
- Get-Domain
- Get-DomainController
- Get-DomainDNSRecord
- Get-DomainDNSZone
- Get-DomainObject
- Get-DomainObjectAcl
- Get-DomainObjectOwner
- Get-DomainSCCM
- Get-DomainRBCD
- Get-DomainWDS
- Get-LocalUser
- Set-DomainObject
- Set-DomainObjectDN
- Set-DomainObjectOwner
- Set-DomainUserPassword
- Set-DomainComputerPassword
- Set-DomainRBCD
- Set-DomainDNSRecord
- Add-DomainUser
- Add-DomainComputer
- Add-DomainGroup
- Add-DomainGroupMember
- Add-DomainOU
- Add-DomainGPO
- Add-DomainObjectAcl
- Add-DomainDNSRecord
- Remove-DomainUser
- Remove-DomainComputer
- Remove-DomainObject
- Remove-DomainGroupMember
- Remove-DomainOU
- Remove-DomainObjectAcl
- Remove-DomainDNSRecord
- Disable-DomainDNSRecord
- Restore-DomainObject
- Unlock-ADAccount
- Enable-ADAccount
- Disable-ADAccount
- Login-As
- Clear-Cache
Computer Enumeration
- Get-NetSession
- Get-NetShare
- Get-NetLoggedOn
- Get-RegLoggedOn
- Get-NetComputerInfo
- Get-NetTerminalSession
- Get-NetProcess
- Stop-NetProcess
- Get-EventLog
- Get-EventLogChannel
- Get-EventLogPublisher
- Get-NetService
- Start-NetService
- Stop-NetService
- Add-NetService
- Set-NetService
- Remove-NetService
- Stop-Computer
- Restart-Computer
- Remove-NetTerminalSession
- Remove-NetSession
- Logoff-Session