diff --git a/ADMF/ADMF.psd1 b/ADMF/ADMF.psd1 index 716c35f..e9d2c7f 100644 --- a/ADMF/ADMF.psd1 +++ b/ADMF/ADMF.psd1 @@ -3,7 +3,7 @@ RootModule = 'ADMF.psm1' # Version number of this module. - ModuleVersion = '1.13.98' + ModuleVersion = '1.13.100' # ID used to uniquely identify this module GUID = '43f2a890-942f-4dd7-bad0-b774b44ea849' @@ -26,15 +26,15 @@ # Modules that must be imported into the global environment prior to importing # this module RequiredModules = @( - @{ ModuleName = 'PSFramework'; ModuleVersion = '1.7.270' } - @{ ModuleName = 'ADSec'; ModuleVersion = '1.0.0' } + @{ ModuleName = 'PSFramework'; ModuleVersion = '1.10.318' } + @{ ModuleName = 'ADSec'; ModuleVersion = '1.0.1' } @{ ModuleName = 'string'; ModuleVersion = '1.1.3' } @{ ModuleName = 'ResolveString'; ModuleVersion = '1.0.0' } @{ ModuleName = 'Principal'; ModuleVersion = '1.0.0' } @{ ModuleName = 'ADMF.Core'; ModuleVersion = '1.1.9' } @{ ModuleName = 'DCManagement'; ModuleVersion = '1.2.25' } - @{ ModuleName = 'DomainManagement'; ModuleVersion = '1.8.199' } - @{ ModuleName = 'ForestManagement'; ModuleVersion = '1.5.66' } + @{ ModuleName = 'DomainManagement'; ModuleVersion = '1.8.202' } + @{ ModuleName = 'ForestManagement'; ModuleVersion = '1.5.73' } ) # Assemblies that must be loaded prior to importing this module diff --git a/ADMF/changelog.md b/ADMF/changelog.md index b498ba5..f17dbcb 100644 --- a/ADMF/changelog.md +++ b/ADMF/changelog.md @@ -1,5 +1,10 @@ # Changelog +## 1.13.100 (2024-01-12) + +- Fix: Group Policy - does not respect "MayModify" +- Fix: Export-AdmfGpo - incorrect type validation + ## 1.13.98 (2023-09-27) - Upd: Set-AdmfContext - added context name to Certificate component diff --git a/ADMF/functions/Set-AdmfContext.ps1 b/ADMF/functions/Set-AdmfContext.ps1 index b15e549..7b1db15 100644 --- a/ADMF/functions/Set-AdmfContext.ps1 +++ b/ADMF/functions/Set-AdmfContext.ps1 @@ -362,7 +362,7 @@ $file = Get-Item $exportDataPath Write-PSFMessage -Level Debug -String 'Set-AdmfContext.Context.Loading' -StringValues $ContextObject.Name, 'Group Policy', $file.FullName try { - $dataSet = Import-PSFPowerShellDataFile -LiteralPath $file.FullName -Unsafe -ErrorAction Stop | ConvertTo-PSFHashtable -Include DisplayName, Description, ID, ExportID, WMiFilter + $dataSet = Import-PSFPowerShellDataFile -LiteralPath $file.FullName -Unsafe -ErrorAction Stop | ConvertTo-PSFHashtable -Include DisplayName, Description, ID, ExportID, WMiFilter, MayModify foreach ($policyEntry in $dataSet) { Register-DMGroupPolicy @policyEntry -Path "$($ContextObject.Path)\domain\grouppolicies\$($policyEntry.ID)" -ContextName $ContextObject.Name } diff --git a/ADMF/internal/scriptblocks/scriptblocks.ps1 b/ADMF/internal/scriptblocks/scriptblocks.ps1 index 985dbbd..eb101e2 100644 --- a/ADMF/internal/scriptblocks/scriptblocks.ps1 +++ b/ADMF/internal/scriptblocks/scriptblocks.ps1 @@ -12,10 +12,7 @@ Set-PSFScriptblock -Name 'ADMF.ScriptBlockName' -Scriptblock { #> Set-PSFScriptblock -Name 'ADMF.Validate.Type.Gpo' -Scriptblock { foreach ($item in $_) { - if ( - -not ($item -is [Microsoft.GroupPolicy.Gpo]) -or - ($item.PSObject.TypeNames -contains 'Microsoft.GroupPolicy.Gpo') - ) { return $false } + if ($item.PSObject.TypeNames -notcontains 'Microsoft.GroupPolicy.Gpo') { return $false } } $true }