API Reference
Command
Get-ADXLgpo
Gets Local GPO snapshot (Machine/User or per-user by SID) and optional diff against .pol/.reg/LGPO text/PolicyRules.
Examples
Example 1: Snapshot Machine LGPO (summary)
Get-ADXLgpo -Scope Machine -View Summary
Example 2: Render current LGPO as lgpo.exe text
Get-ADXLgpo -Scope Machine -View LgpoText
Example 3: Compare against PolicyRules baseline
Get-ADXLgpo -Scope Machine -AgainstPolicyRules C:\in\Baseline.PolicyRules -View Diff -Minimal
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Get-ADXLgpo [-AgainstPol <string>] [-Minimal] [-Scope <Computer|User>] [-UserSid <string>] [-View <Raw|Entries|Summary|Diff|LgpoText>] [<CommonParameters>]#Parameter set:
By AgainstPolParameters
- AgainstPol string
- Compare current LGPO against a reference .pol file.
- Minimal SwitchParameter
- Emit compact rows for -View Diff (added/removed/changed only).
- Scope RegistryPolicyScope
- LGPO scope to inspect (Machine or User). Possible values: Computer, User
- Possible values:
Computer,User - UserSid string
- Optional per-user SID for MLGPO (when Scope=User).
- View AdxLgpoView
- Optional view selector. Possible values: None, Raw, Entries, Summary, Diff, LgpoText
- Possible values:
Raw,Entries,Summary,Diff,LgpoText
Outputs
ADPlayground.Gpo.GpoLocal.LgpoDiffReport, ADPlayground.Gpo.GpoLocal.LgpoSnapshotReport
Get-ADXLgpo [-AgainstReg <string>] [-Minimal] [-Scope <Computer|User>] [-UserSid <string>] [-View <Raw|Entries|Summary|Diff|LgpoText>] [<CommonParameters>]#Parameter set:
By AgainstRegParameters
- AgainstReg string
- Compare current LGPO against a .reg export (converted).
- Minimal SwitchParameter
- Emit compact rows for -View Diff (added/removed/changed only).
- Scope RegistryPolicyScope
- LGPO scope to inspect (Machine or User). Possible values: Computer, User
- Possible values:
Computer,User - UserSid string
- Optional per-user SID for MLGPO (when Scope=User).
- View AdxLgpoView
- Optional view selector. Possible values: None, Raw, Entries, Summary, Diff, LgpoText
- Possible values:
Raw,Entries,Summary,Diff,LgpoText
Outputs
ADPlayground.Gpo.GpoLocal.LgpoDiffReport, ADPlayground.Gpo.GpoLocal.LgpoSnapshotReport
Get-ADXLgpo [-AgainstLgpoText <string>] [-Minimal] [-Scope <Computer|User>] [-UserSid <string>] [-View <Raw|Entries|Summary|Diff|LgpoText>] [<CommonParameters>]#Parameter set:
By AgainstLgpoTextParameters
- AgainstLgpoText string
- Compare current LGPO against LGPO text format (lgpo.exe /t output).
- Minimal SwitchParameter
- Emit compact rows for -View Diff (added/removed/changed only).
- Scope RegistryPolicyScope
- LGPO scope to inspect (Machine or User). Possible values: Computer, User
- Possible values:
Computer,User - UserSid string
- Optional per-user SID for MLGPO (when Scope=User).
- View AdxLgpoView
- Optional view selector. Possible values: None, Raw, Entries, Summary, Diff, LgpoText
- Possible values:
Raw,Entries,Summary,Diff,LgpoText
Outputs
ADPlayground.Gpo.GpoLocal.LgpoDiffReport, ADPlayground.Gpo.GpoLocal.LgpoSnapshotReport
Get-ADXLgpo [-AgainstPolicyRules <string>] [-Minimal] [-Scope <Computer|User>] [-UserSid <string>] [-View <Raw|Entries|Summary|Diff|LgpoText>] [<CommonParameters>]#Parameter set:
By AgainstPolicyRulesParameters
- AgainstPolicyRules string
- Compare current LGPO against Microsoft Policy Analyzer .PolicyRules XML.
- Minimal SwitchParameter
- Emit compact rows for -View Diff (added/removed/changed only).
- Scope RegistryPolicyScope
- LGPO scope to inspect (Machine or User). Possible values: Computer, User
- Possible values:
Computer,User - UserSid string
- Optional per-user SID for MLGPO (when Scope=User).
- View AdxLgpoView
- Optional view selector. Possible values: None, Raw, Entries, Summary, Diff, LgpoText
- Possible values:
Raw,Entries,Summary,Diff,LgpoText
Outputs
ADPlayground.Gpo.GpoLocal.LgpoDiffReport, ADPlayground.Gpo.GpoLocal.LgpoSnapshotReport