Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Install Prerequisites
run: .\build\vsts-prerequisites.ps1
run: .\build\psf-prerequisites.ps1
shell: powershell
- name: Validate
run: .\build\vsts-validate.ps1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Install Prerequisites
run: .\build\vsts-prerequisites.ps1
run: .\build\psf-prerequisites.ps1
shell: powershell
- name: Validate
run: .\build\vsts-validate.ps1
Expand Down
12 changes: 6 additions & 6 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.14.112'
ModuleVersion = '1.15.120'

# 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.13.416' }
@{ ModuleName = 'PSFramework'; ModuleVersion = '1.14.449' }
@{ ModuleName = 'ADSec'; ModuleVersion = '1.0.1' }
@{ ModuleName = 'string'; ModuleVersion = '1.2.13' }
@{ ModuleName = 'ResolveString'; ModuleVersion = '1.0.0' }
@{ ModuleName = 'Principal'; ModuleVersion = '1.0.0' }
@{ ModuleName = 'ADMF.Core'; ModuleVersion = '1.2.12' }
@{ ModuleName = 'Principal'; ModuleVersion = '1.0.1' }
@{ ModuleName = 'ADMF.Core'; ModuleVersion = '1.4.20' }
@{ ModuleName = 'DCManagement'; ModuleVersion = '1.2.26' }
@{ ModuleName = 'DomainManagement'; ModuleVersion = '1.9.234' }
@{ ModuleName = 'ForestManagement'; ModuleVersion = '1.5.82' }
@{ ModuleName = 'DomainManagement'; ModuleVersion = '1.10.257' }
@{ ModuleName = 'ForestManagement'; ModuleVersion = '1.6.85' }
)

# Assemblies that must be loaded prior to importing this module
Expand Down
Binary file modified ADMF/bin/ADMF.dll
Binary file not shown.
Binary file modified ADMF/bin/ADMF.pdb
Binary file not shown.
11 changes: 11 additions & 0 deletions ADMF/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 1.15.120 (2026-06-19)

- Upd: Components - Added support for Access Rules in Configuration and Schema Naming Contexts
- Upd: Components - Added support for Access Rule Modes in Configuration and Schema Naming Contexts
- Upd: Components - Added support for ACLs in Configuration and Schema Naming Contexts
- Upd: Components - Added support for Object Categories in Configuration and Schema Naming Contexts
- Upd: Components - Added support for Object Categories in Configuration and Schema Naming Contexts
- Upd: Components - Added support for Forest Content Modes, defining what part of the Configuration and Schema Naming Contexts are considered "under management"
- Upd: DefaultAccessRules - Added defaults definition for ACLs and AccessRules for the Configuration and Schema Naming Contexts
- Upd: Dependencies - PSFramework minimum version raised to 1.14.449

## 1.14.112 (2025-10-31)

- New: Remoting - all PS Remoting connections can now be configured with session options or to use SSH
Expand Down
14 changes: 14 additions & 0 deletions ADMF/functions/Invoke-AdmfForest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,20 @@
}
else { Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'Certificate' }
}
if ($newOptions -band [UpdateForestOptions]::Acl) {
if (Get-FMAcl | Remove-PSFNull) {
Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Executing.Invoke' -StringValues 'Acls', $parameters.Server
Invoke-FMAcl @parameters
}
else { Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'Acls' }
}
if ($newOptions -band [UpdateForestOptions]::AccessRule) {
if (Get-FMAccessRule) {
Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Executing.Invoke' -StringValues 'AccessRules', $parameters.Server
Invoke-FMAccessRule @parameters
}
else { Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'AccessRules' }
}
}
catch {
Write-Error $_
Expand Down
56 changes: 53 additions & 3 deletions ADMF/functions/Set-AdmfContext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@

#region Forest
$forestFields = @{
'accessrules' = Get-Command Register-FMAccessRule
'accessrulemodes' = Get-Command Register-AdcAccessRuleMode
'acls' = Get-Command Register-FMAcl
'exchangeschema' = Get-Command Register-FMExchangeSchema
'schema' = Get-Command Register-FMSchema
'schemaDefaultPermissions' = Get-Command Register-FMSchemaDefaultPermission
Expand Down Expand Up @@ -163,6 +166,7 @@
}
}

#region Schema Ldif
if (Test-Path "$($ContextObject.Path)\forest\schemaldif") {
$filesProcessed = @()

Expand Down Expand Up @@ -215,7 +219,8 @@
}
#endregion Process Ldif Files without configuration
}

#endregion Schema Ldif

# Forest Level
$forestLevelPath = Resolve-DataFile -Path "$($ContextObject.Path)\forest\forest_level"
if ($forestLevelPath) {
Expand Down Expand Up @@ -310,13 +315,58 @@
}
#endregion Certificates

#region Object Categories
foreach ($file in (Get-ChildItem "$($ContextObject.Path)\forest\objectcategories" -Filter '*.psd1' -ErrorAction Ignore)) {
try {
$dataSet = Import-PSFPowerShellDataFile -Path $file.FullName
$dataSet.TestScript = $dataSet.TestScript.Invoke() | Write-Output # Remove automatic scriptblock nesting
Register-AdcObjectCategory @dataSet -ContextName $ContextObject.Name
}
catch {
Clear-AdcConfiguration
Stop-PSFFunction @stopParam -String 'Set-AdmfContext.Context.Error.ForestConfig' -StringValues $ContextObject.Name, 'Object Categories', $file.FullName -ErrorRecord $_
return
}
}
#endregion Object Categories

#region Content Mode
$forestContentModePath = Resolve-DataFile -Path "$($ContextObject.Path)\forest\content_mode"
if ($forestContentModePath) {
$file = Get-Item -Path $forestContentModePath
Write-PSFMessage -Level Debug -String 'Set-AdmfContext.Context.Loading' -StringValues $ContextObject.Name, 'ContentMode', $file.FullName
try {
$dataSet = Import-PSFPowerShellDataFile -LiteralPath $file.FullName -Unsafe -ErrorAction Stop
if ($dataSet.Mode) { Set-FMContentMode -Mode $dataSet.Mode }
if ($dataSet.Include) {
$includes = @((Get-FMContentMode).Include)
foreach ($entry in $dataSet.Include) { $includes += $entry }
Set-FMContentMode -Include $includes
}
if ($dataSet.Exclude) {
$excludes = @((Get-FMContentMode).Exclude)
foreach ($entry in $dataSet.Exclude) { $excludes += $entry }
Set-FMContentMode -Exclude $excludes
}
if ($dataSet.Keys -contains 'ExcludeComponents') {
Set-FMContentMode -ExcludeComponents $dataSet.ExcludeComponents
}
}
catch {
Clear-AdcConfiguration
Stop-PSFFunction @stopParam -String 'Set-AdmfContext.Context.Error.ForestConfig' -StringValues $ContextObject.Name, 'ContentMode', $file.FullName -ErrorRecord $_
return
}
}
#endregion Content Mode

#endregion Forest

#region Domain
$domainFields = @{
'organizationalunits' = Get-Command Register-DMOrganizationalUnit
'accessrules' = Get-Command Register-DMAccessRule
'accessrulemodes' = Get-Command Register-DMAccessRuleMode
'accessrulemodes' = Get-Command Register-AdcAccessRuleMode
'acls' = Get-Command Register-DMAcl
'builtinsids' = Get-Command Register-DMBuiltInSID
'exchange' = Get-Command Register-DMExchange
Expand Down Expand Up @@ -379,7 +429,7 @@
try {
$dataSet = Import-PSFPowerShellDataFile -Path $file.FullName
$dataSet.TestScript = $dataSet.TestScript.Invoke() | Write-Output # Remove automatic scriptblock nesting
Register-DMObjectCategory @dataSet -ContextName $ContextObject.Name
Register-AdcObjectCategory @dataSet -ContextName $ContextObject.Name
}
catch {
Clear-AdcConfiguration
Expand Down
14 changes: 14 additions & 0 deletions ADMF/functions/Test-AdmfForest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,20 @@
}
else { Write-PSFMessage -Level Host -String 'Test-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'ExchangeSchema' }
}
if ($newOptions -band [UpdateForestOptions]::Acl) {
if (Get-FMAcl | Remove-PSFNull) {
Write-PSFMessage -Level Host -String 'Test-AdmfForest.Executing.Test' -StringValues 'Acls', $parameters.Server
Test-FMAcl @parameters
}
else { Write-PSFMessage -Level Host -String 'Test-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'Acls' }
}
if ($newOptions -band [UpdateForestOptions]::AccessRule) {
if (Get-FMAccessRule) {
Write-PSFMessage -Level Host -String 'Test-AdmfForest.Executing.Test' -StringValues 'AccessRules', $parameters.Server
Test-FMAccessRule @parameters
}
else { Write-PSFMessage -Level Host -String 'Test-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'AccessRules' }
}
}
catch {
Write-Error $_
Expand Down
Loading