TestimoX

API Reference

Command

Set-CxLgpoPol

Namespace ComputerX.PowerShell
Inputs
ComputerX.Lgpo.LgpoPolItem[] System.String
Outputs
System.Boolean

Writes LGPO (registry.pol) for Machine or User scope.

Examples

Authored help example

Example 1


Set-CxLgpoPol -Scope Machine -JsonPath .\machine.pol.json -Merge -Backup
        

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

Set-CxLgpoPol [-ComputerName <string>] -Scope <string> -Items <LgpoPolItem[]> [-Merge] [-Backup] [<CommonParameters>]
#
Parameter set: By Items

Parameters

ComputerName string optionalposition: 0pipeline: true (ByPropertyName)
Target computer(s). Use '.' for local computer or provide DNS names.
Scope string requiredposition: 1pipeline: false
LGPO scope to write, such as machine or user policy.
Items LgpoPolItem[] requiredposition: 2pipeline: true (ByValue, ByPropertyName)
Typed LGPO items to write to the selected registry.pol file.
Merge SwitchParameter optionalposition: 3pipeline: false
Preserves unrelated entries already present in the target registry.pol file.
Backup SwitchParameter optionalposition: 4pipeline: false
Creates a backup copy of the target registry.pol file before writing changes.

Outputs

System.Boolean

Set-CxLgpoPol [-ComputerName <string>] -Scope <string> -JsonPath <string> [-Merge] [-Backup] [<CommonParameters>]
#
Parameter set: By JsonPath

Parameters

ComputerName string optionalposition: 0pipeline: true (ByPropertyName)
Target computer(s). Use '.' for local computer or provide DNS names.
Scope string requiredposition: 1pipeline: false
LGPO scope to write, such as machine or user policy.
JsonPath string requiredposition: 2pipeline: false
Path to a JSON baseline that should be converted back into LGPO items before writing.
Merge SwitchParameter optionalposition: 3pipeline: false
Preserves unrelated entries already present in the target registry.pol file.
Backup SwitchParameter optionalposition: 4pipeline: false
Creates a backup copy of the target registry.pol file before writing changes.

Outputs

System.Boolean