API Reference
Command
Import-ADXLgpo
Imports Local GPO content from a GPMC backup, LGPO.exe text, or Policy Analyzer .PolicyRules.
Examples
Example 1: Import from GPMC backup (LGPO.exe /g parity)
Import-ADXLgpo -BackupPath C:\Backups\GPOs
Example 2: Import LGPO text (lgpo.exe text format), replacing existing entries
Import-ADXLgpo -LgpoTextPath .\baseline.lgpo.txt -Replace
Example 3: Convert PolicyRules to registry.pol and import to Machine scope
Import-ADXLgpo -PolicyRulesPath .\Baseline.PolicyRules -Scope Computer
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
Import-ADXLgpo -BackupPath <string> [-NoSecurityTemplate] [-Replace] [<CommonParameters>]#Parameter set:
By BackupPathParameters
- BackupPath string
- Root folder of a GPMC backup to import.
- NoSecurityTemplate SwitchParameter
- When set, skips merging GptTmpl.inf security template.
- Replace SwitchParameter
- When set, overwrites existing registry.pol instead of merging.
Import-ADXLgpo -LgpoTextPath <string> [-ReplaceText] [<CommonParameters>]#Parameter set:
By LgpoTextPathParameters
- LgpoTextPath string
- Path to an LGPO.exe 4‑line text file to import.
- ReplaceText SwitchParameter
- When set, overwrites existing registry.pol instead of merging.
Import-ADXLgpo -PolicyRulesPath <string> [-ReplaceRules] [-Scope <Computer|User>] [-UserSid <string>] [<CommonParameters>]#Parameter set:
By PolicyRulesPathParameters
- PolicyRulesPath string
- Path to Microsoft Policy Analyzer .PolicyRules XML to convert and import.
- ReplaceRules SwitchParameter
- When set, overwrites existing registry.pol instead of merging.
- Scope RegistryPolicyScope
- Target LGPO scope for PolicyRules import. Possible values: Computer, User
- Possible values:
Computer,User - UserSid string
- Optional per-user SID when -Scope User (MLGPO).