diff --git a/ForestManagement/ForestManagement.psd1 b/ForestManagement/ForestManagement.psd1 index f7c4ed7..8824219 100644 --- a/ForestManagement/ForestManagement.psd1 +++ b/ForestManagement/ForestManagement.psd1 @@ -3,7 +3,7 @@ RootModule = 'ForestManagement.psm1' # Version number of this module. - ModuleVersion = '1.5.79' + ModuleVersion = '1.5.81' # ID used to uniquely identify this module GUID = '7de4379d-17c8-48d3-bd6d-93279aef64bb' diff --git a/ForestManagement/changelog.md b/ForestManagement/changelog.md index c68bb80..b78a06e 100644 --- a/ForestManagement/changelog.md +++ b/ForestManagement/changelog.md @@ -1,5 +1,10 @@ # Changelog +## 1.5.81 (2025-10-02) + +- Upd: Schema - added parameter to report unmanaged attributes (which will lead to no action during invoke) +- Fix: ExchangeSchema - fails to report failure to update because of a pending reboot + ## 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 diff --git a/ForestManagement/functions/exchangeschema/Invoke-FMExchangeSchema.ps1 b/ForestManagement/functions/exchangeschema/Invoke-FMExchangeSchema.ps1 index 8a41445..265ec02 100644 --- a/ForestManagement/functions/exchangeschema/Invoke-FMExchangeSchema.ps1 +++ b/ForestManagement/functions/exchangeschema/Invoke-FMExchangeSchema.ps1 @@ -191,6 +191,7 @@ # Test Message validation (Text parsing is bad, but the method below is less reliable) if ($result.Message -match 'The Exchange Server setup operation completed successfully') { return } + if ($result.Message -match 'A reboot from a previous installation is pending') { throw "Error applying exchange update: A reboot is pending!"} # Exchange's setup.exe is not always reliable in its exit codes, thus we need to retest # This is not guaranteed to work 100%, as replication delay may lead to false errors diff --git a/ForestManagement/functions/schema/Test-FMSchema.ps1 b/ForestManagement/functions/schema/Test-FMSchema.ps1 index 496c376..ceeda3f 100644 --- a/ForestManagement/functions/schema/Test-FMSchema.ps1 +++ b/ForestManagement/functions/schema/Test-FMSchema.ps1 @@ -14,6 +14,9 @@ .PARAMETER Credential The credentials to use for this operation. + .PARAMETER ReportUnconfigured + Whether to generate test results for unconfigured schema attributes. + .PARAMETER EnableException This parameters disables user-friendly warnings and enables the throwing of exceptions. This is less user friendly, but allows catching exceptions in calling scripts. @@ -31,6 +34,9 @@ [PSCredential] $Credential, + [switch] + $ReportUnconfigured = (Get-PSFConfigValue -FullName 'ForestManagement.Schema.Attributes.ReportUnconfigured'), + [switch] $EnableException ) @@ -207,7 +213,7 @@ #endregion Process Configuration #region Process AD Only - if (-not (Get-PSFConfigValue -FullName 'ForestManagement.Schema.Attributes.ReportUnconfigured')) { return } + if (-not $ReportUnconfigured) { return } $unconfigured = $allAttributes | Where-Object attributeID -NotIn (Get-FMSchema).OID foreach ($unexpectedAttribute in $unconfigured) { if ($unexpectedAttribute.IsDefunct) { continue }