Skip to content

Commit a4bf4d5

Browse files
Merge pull request #60 from ActiveDirectoryManagementFramework/december24
1.13.103
2 parents e996d1a + 0d1209b commit a4bf4d5

File tree

5 files changed

+23375
-12
lines changed

5 files changed

+23375
-12
lines changed

ADMF/ADMF.psd1

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
RootModule = 'ADMF.psm1'
44

55
# Version number of this module.
6-
ModuleVersion = '1.13.100'
6+
ModuleVersion = '1.13.103'
77

88
# ID used to uniquely identify this module
99
GUID = '43f2a890-942f-4dd7-bad0-b774b44ea849'
@@ -26,15 +26,15 @@
2626
# Modules that must be imported into the global environment prior to importing
2727
# this module
2828
RequiredModules = @(
29-
@{ ModuleName = 'PSFramework'; ModuleVersion = '1.10.318' }
29+
@{ ModuleName = 'PSFramework'; ModuleVersion = '1.12.346' }
3030
@{ ModuleName = 'ADSec'; ModuleVersion = '1.0.1' }
3131
@{ ModuleName = 'string'; ModuleVersion = '1.1.3' }
3232
@{ ModuleName = 'ResolveString'; ModuleVersion = '1.0.0' }
3333
@{ ModuleName = 'Principal'; ModuleVersion = '1.0.0' }
3434
@{ ModuleName = 'ADMF.Core'; ModuleVersion = '1.1.9' }
3535
@{ ModuleName = 'DCManagement'; ModuleVersion = '1.2.25' }
36-
@{ ModuleName = 'DomainManagement'; ModuleVersion = '1.8.202' }
37-
@{ ModuleName = 'ForestManagement'; ModuleVersion = '1.5.73' }
36+
@{ ModuleName = 'DomainManagement'; ModuleVersion = '1.9.210' }
37+
@{ ModuleName = 'ForestManagement'; ModuleVersion = '1.5.78' }
3838
)
3939

4040
# Assemblies that must be loaded prior to importing this module

ADMF/changelog.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 1.13.103 (2024-12-13)
4+
5+
- Upd: New-AdmfContext - added `-Components` parameter for adding extra content to newly created Contexts.
6+
- Upd: New-AdmfContext - added the ability to include the schema default attributes in a new Context.
7+
- Upd: Set-AdmfContext - added ExcludeComponents property to content mode files
8+
39
## 1.13.100 (2024-01-12)
410

511
- Fix: Group Policy - does not respect "MayModify"

ADMF/functions/New-AdmfContext.ps1

+24-8
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
.PARAMETER MutuallyExclusive
4949
Contexts that are mutually exclusive with each other.
5050
E.g.: Where the user has to select between one of several environments.
51+
52+
.PARAMETER Components
53+
What extra components to include in the new context
5154
5255
.PARAMETER DefaultAccessRules
5356
A new Active Directory environment comes with more deployed security delegations than defined in the schema.
@@ -117,6 +120,15 @@
117120

118121
[string[]]
119122
$MutuallyExclusive = @(),
123+
124+
[ValidateSet(
125+
'DefaultAccessRules',
126+
'DefaultSchemaAttributes',
127+
'ExchangeDefaultAccessRules',
128+
'ExchangeSplitPermissionAccessRules'
129+
)]
130+
[string[]]
131+
$Components,
120132

121133
[switch]
122134
$DefaultAccessRules,
@@ -170,7 +182,7 @@
170182
Copy-Item -Path "$script:ModuleRoot\internal\data\context\*" -Destination "$($contextVersionFolder.FullName)\" -Recurse
171183

172184
#region Default Access Rules
173-
if ($DefaultAccessRules){
185+
if ($DefaultAccessRules -or $Components -contains 'DefaultAccessRules'){
174186
Copy-Item -Path "$script:ModuleRoot\internal\data\domainDefaults\accessRules\*.json" -Destination "$($contextVersionFolder.FullName)\domain\accessrules\"
175187
Copy-Item -Path "$script:ModuleRoot\internal\data\domainDefaults\objectCategories\*.psd1" -Destination "$($contextVersionFolder.FullName)\domain\objectcategories\"
176188
Copy-Item -Path "$script:ModuleRoot\internal\data\domainDefaults\gppermissions\*.json" -Destination "$($contextVersionFolder.FullName)\domain\gppermissions\"
@@ -180,14 +192,18 @@
180192
}
181193
#endregion Default Access Rules
182194

195+
#region Default Schema Attributes
196+
if ($Components -contains 'DefaultSchemaAttributes') {
197+
Copy-Item -Path "$script:ModuleRoot\internal\data\forestDefaults\schema\*.json" -Destination "$($contextVersionFolder.FullName)\forest\schema\"
198+
}
199+
#endregion Default Schema Attributes
200+
183201
#region Exchange Access Rules
184-
switch ($ExchangeAccessRules) {
185-
'Default' {
186-
Copy-Item -Path "$script:ModuleRoot\internal\data\exchangeDefaults\accessRules\*.json" -Destination "$($contextVersionFolder.FullName)\domain\accessrules\"
187-
}
188-
'SplitPermission' {
189-
Copy-Item -Path "$script:ModuleRoot\internal\data\exchangeSPDefaults\accessRules\*.json" -Destination "$($contextVersionFolder.FullName)\domain\accessrules\"
190-
}
202+
if ($ExchangeAccessRules -eq 'SplitPermission' -or $Components -contains 'ExchangeSplitPermissionAccessRules') {
203+
Copy-Item -Path "$script:ModuleRoot\internal\data\exchangeSPDefaults\accessRules\*.json" -Destination "$($contextVersionFolder.FullName)\domain\accessrules\"
204+
}
205+
elseif ($ExchangeAccessRules -eq 'Default' -or $Components -contains 'ExchangeDefaultAccessRules') {
206+
Copy-Item -Path "$script:ModuleRoot\internal\data\exchangeDefaults\accessRules\*.json" -Destination "$($contextVersionFolder.FullName)\domain\accessrules\"
191207
}
192208
#endregion Exchange Access Rules
193209

ADMF/functions/Set-AdmfContext.ps1

+3
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,9 @@
444444
if ($dataSet.Keys -contains 'RemoveUnknownWmiFilter') {
445445
Set-DMContentMode -RemoveUnknownWmiFilter $dataSet.RemoveUnknownWmiFilter
446446
}
447+
if ($dataSet.Keys -contains 'ExcludeComponents') {
448+
Set-DMContentMode -ExcludeComponents $dataSet.ExcludeComponents
449+
}
447450
}
448451
catch {
449452
Clear-AdcConfiguration

0 commit comments

Comments
 (0)