diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 5d3b927..46033ea 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,5 +1,9 @@ # PasswordSolution Release History +## 1.3.2 - 2024.08.23 +- Improvement on logging +- Small improvement to message + ## 1.3.1 - 2024.08.23 - Fixes `FilterOrganizationalUnit` not working properly - Add more logs diff --git a/PasswordSolution.psd1 b/PasswordSolution.psd1 index 52bd100..65a08c4 100644 --- a/PasswordSolution.psd1 +++ b/PasswordSolution.psd1 @@ -8,7 +8,7 @@ Description = 'This module allows the creation of password expiry emails for users, managers, administrators, and security according to defined templates. It''s able to work with different rules allowing to fully customize who gets the email and when.' FunctionsToExport = @('Find-Password', 'Find-PasswordNotification', 'Find-PasswordQuality', 'New-PasswordConfigurationEmail', 'New-PasswordConfigurationExternalUsers', 'New-PasswordConfigurationOption', 'New-PasswordConfigurationReport', 'New-PasswordConfigurationRule', 'New-PasswordConfigurationRuleReminder', 'New-PasswordConfigurationTemplate', 'New-PasswordConfigurationType', 'Show-PasswordQuality', 'Start-PasswordSolution') GUID = 'c58ff818-1de6-4500-961c-a243c2043255' - ModuleVersion = '1.3.1' + ModuleVersion = '1.3.2' PowerShellVersion = '5.1' PrivateData = @{ PSData = @{ diff --git a/Private/Invoke-PasswordRuleProcessing.ps1 b/Private/Invoke-PasswordRuleProcessing.ps1 index 0e1f596..168b57e 100644 --- a/Private/Invoke-PasswordRuleProcessing.ps1 +++ b/Private/Invoke-PasswordRuleProcessing.ps1 @@ -416,7 +416,7 @@ } } } else { - if ($Rule.SendToManager.Manager) { + if ($Rule.SendToManager.Manager -and $Rule.SendToManager.Manager.Enable -eq $true) { # Manager rule is enabled but manager is not enabled or has no email if ($Logging.NotifyOnUserMatchingRuleForManagerButNotCompliant) { Write-Color -Text "[i]", " User (manager rule) ", $User.DisplayName, " (", $User.UserPrincipalName, ")", " days to expire: ", $User.DaysToExpire, ", manager status: ", $User.ManagerStatus, ". Reason to skip: ", "No manager or manager is not enabled or manager has no email " -Color Yellow, White, Yellow, White, Yellow, White, White, Red, White, Red, White, Red diff --git a/Public/New-PasswordConfigurationRuleReminder.ps1 b/Public/New-PasswordConfigurationRuleReminder.ps1 index d99145f..ebdc6bd 100644 --- a/Public/New-PasswordConfigurationRuleReminder.ps1 +++ b/Public/New-PasswordConfigurationRuleReminder.ps1 @@ -32,7 +32,7 @@ ) if ($ComparisonType -in 'eq', 'lt', 'gt') { if ($ExpirationDays.Count -gt 1) { - throw "Only one number for 'ExpirationDays' can be specified when using comparison types 'eq', 'lt', and 'gt'." + throw "Only one number for 'ExpirationDays' can be specified for RuleReminder when using comparison types 'eq', 'lt', and 'gt'. Current values are $($ExpirationDays -join ', ') for '$ComparisonType'" } else { $ExpirationDaysToUse = $ExpirationDays[0] }