Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.13.103 #60

Merged
merged 1 commit into from
Dec 13, 2024
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
8 changes: 4 additions & 4 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.100'
ModuleVersion = '1.13.103'

# 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.10.318' }
@{ ModuleName = 'PSFramework'; ModuleVersion = '1.12.346' }
@{ 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.202' }
@{ ModuleName = 'ForestManagement'; ModuleVersion = '1.5.73' }
@{ ModuleName = 'DomainManagement'; ModuleVersion = '1.9.210' }
@{ ModuleName = 'ForestManagement'; ModuleVersion = '1.5.78' }
)

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

## 1.13.103 (2024-12-13)

- Upd: New-AdmfContext - added `-Components` parameter for adding extra content to newly created Contexts.
- Upd: New-AdmfContext - added the ability to include the schema default attributes in a new Context.
- Upd: Set-AdmfContext - added ExcludeComponents property to content mode files

## 1.13.100 (2024-01-12)

- Fix: Group Policy - does not respect "MayModify"
Expand Down
32 changes: 24 additions & 8 deletions ADMF/functions/New-AdmfContext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
.PARAMETER MutuallyExclusive
Contexts that are mutually exclusive with each other.
E.g.: Where the user has to select between one of several environments.

.PARAMETER Components
What extra components to include in the new context

.PARAMETER DefaultAccessRules
A new Active Directory environment comes with more deployed security delegations than defined in the schema.
Expand Down Expand Up @@ -117,6 +120,15 @@

[string[]]
$MutuallyExclusive = @(),

[ValidateSet(
'DefaultAccessRules',
'DefaultSchemaAttributes',
'ExchangeDefaultAccessRules',
'ExchangeSplitPermissionAccessRules'
)]
[string[]]
$Components,

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

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

#region Default Schema Attributes
if ($Components -contains 'DefaultSchemaAttributes') {
Copy-Item -Path "$script:ModuleRoot\internal\data\forestDefaults\schema\*.json" -Destination "$($contextVersionFolder.FullName)\forest\schema\"
}
#endregion Default Schema Attributes

#region Exchange Access Rules
switch ($ExchangeAccessRules) {
'Default' {
Copy-Item -Path "$script:ModuleRoot\internal\data\exchangeDefaults\accessRules\*.json" -Destination "$($contextVersionFolder.FullName)\domain\accessrules\"
}
'SplitPermission' {
Copy-Item -Path "$script:ModuleRoot\internal\data\exchangeSPDefaults\accessRules\*.json" -Destination "$($contextVersionFolder.FullName)\domain\accessrules\"
}
if ($ExchangeAccessRules -eq 'SplitPermission' -or $Components -contains 'ExchangeSplitPermissionAccessRules') {
Copy-Item -Path "$script:ModuleRoot\internal\data\exchangeSPDefaults\accessRules\*.json" -Destination "$($contextVersionFolder.FullName)\domain\accessrules\"
}
elseif ($ExchangeAccessRules -eq 'Default' -or $Components -contains 'ExchangeDefaultAccessRules') {
Copy-Item -Path "$script:ModuleRoot\internal\data\exchangeDefaults\accessRules\*.json" -Destination "$($contextVersionFolder.FullName)\domain\accessrules\"
}
#endregion Exchange Access Rules

Expand Down
3 changes: 3 additions & 0 deletions ADMF/functions/Set-AdmfContext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@
if ($dataSet.Keys -contains 'RemoveUnknownWmiFilter') {
Set-DMContentMode -RemoveUnknownWmiFilter $dataSet.RemoveUnknownWmiFilter
}
if ($dataSet.Keys -contains 'ExcludeComponents') {
Set-DMContentMode -ExcludeComponents $dataSet.ExcludeComponents
}
}
catch {
Clear-AdcConfiguration
Expand Down
Loading