Skip to content

Commit

Permalink
Added MayModify parameter for GPOs
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedrichWeinmann committed Dec 8, 2023
1 parent 9443906 commit 95dd6f9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DomainManagement/DomainManagement.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RootModule = 'DomainManagement.psm1'

# Version number of this module.
ModuleVersion = '1.8.199'
ModuleVersion = '1.8.201'

# ID used to uniquely identify this module
GUID = '0a405382-ebc2-445b-8325-541535810193'
Expand Down
3 changes: 2 additions & 1 deletion DomainManagement/changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changelog

## ???
## 1.8.201 (2023-12-08)

- Upd: Group Policy - will now detect group policies that have been created but not yet linked as created.
- Upd: Group Policy - supports a setting (`-MayModify`) to ignore manual changes after deploying a GPO via ADMF.

## 1.8.199 (2023-09-27)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
.PARAMETER ExportID
The tracking ID assigned to the GPO in order to detect its revision.
.PARAMETER MayModify
The group policy may be modified manually after deployment.
.PARAMETER WmiFilter
The WmiFilter to apply to the group policy object.
Expand Down Expand Up @@ -58,6 +61,10 @@
[string]
$ExportID,

[Parameter(ValueFromPipelineByPropertyName = $true)]
[switch]
$MayModify,

[Parameter(ValueFromPipelineByPropertyName = $true)]
[string]
$WmiFilter,
Expand All @@ -74,6 +81,7 @@
ID = $ID
Path = $Path
ExportID = $ExportID
MayModify = $MayModify
WmiFilter = $WmiFilter
ContextName = $ContextName
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
'Healthy' {
$changes = [System.Collections.ArrayList]@()
$policyObject = $policyHash[$desiredPolicy.DisplayName]
if ($policyObject.Version -ne $policyObject.ADVersion) {
if (-not $desiredPolicy.MayModify -and $policyObject.Version -ne $policyObject.ADVersion) {
$change = New-Change -Property Modified -OldValue $policyObject.Version -NewValue $policyObject.ADVersion -Identity $desiredPolicy.DisplayName -Type AdmfVersion
$null = $changes.Add($change)
}
Expand Down

0 comments on commit 95dd6f9

Please sign in to comment.