Skip to content

Commit

Permalink
Merge pull request #55 from ActiveDirectoryManagementFramework/January24
Browse files Browse the repository at this point in the history
1.13.100
  • Loading branch information
FriedrichWeinmann authored Jan 12, 2024
2 parents d28627a + 36c9961 commit e996d1a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
10 changes: 5 additions & 5 deletions ADMF/ADMF.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions ADMF/changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ADMF/functions/Set-AdmfContext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
5 changes: 1 addition & 4 deletions ADMF/internal/scriptblocks/scriptblocks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e996d1a

Please sign in to comment.