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 ForestManagement/ForestManagement.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RootModule = 'ForestManagement.psm1'

# Version number of this module.
ModuleVersion = '1.5.78'
ModuleVersion = '1.5.79'

# ID used to uniquely identify this module
GUID = '7de4379d-17c8-48d3-bd6d-93279aef64bb'
Expand Down
4 changes: 4 additions & 0 deletions ForestManagement/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.5.79 (2025-05-28)

- Upd: Schema - Test results are returned in the order they should be applied, to simplify use with Invoke-AdmfItem

## 1.5.78 (2024-12-13)

- Upd: Schema - significant test performance improvements
Expand Down
11 changes: 10 additions & 1 deletion ForestManagement/functions/schema/Test-FMSchema.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
$allClasses = Get-ADObject @parameters -LDAPFilter "(objectClass=classSchema)" -SearchBase $rootDSE.schemaNamingContext -ErrorAction Ignore -Properties *

#region Process Configuration
foreach ($schemaSetting in (Get-FMSchema)) {
$results = foreach ($schemaSetting in (Get-FMSchema)) {
$schemaObject = $null
$schemaObject = $allAttributes.Where{ $_.attributeID -eq $schemaSetting.OID }[0]

Expand Down Expand Up @@ -195,6 +195,15 @@
}
}
}

# Ensure tests are returned in sorting order needed to invoke.
# Invoke-FMSchema doesn't care - it invokes correctly - but Invoke-AdmfItem will have issues otherwise
$results | Sort-Object Identity, {
if ($_.Type -eq 'Decommission') { 0 }
elseif ($_.Type -eq 'Rename') { 2 }
elseif ($_.Type -eq 'ConfigurationOnly') { 3 }
else { 1 }
}
#endregion Process Configuration

#region Process AD Only
Expand Down