-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
bugSomething isn't workingSomething isn't working
Description
[ordered] @{
Enable = $false # doesn't processes this section at all if $false
RemindersDisplayOnly = $false # prevents sending any emails (good for testing) - including managers
SendToDefaultEmail = $true # if enabled $EmailParameters are used (good for testing)
Reminders = 1, 7, 14, 15 # both dictionary and array works for reminders
UseAdditionalField = 'extensionAttribute13'
SendCountMaximum = 3
}
[ordered]@{
Enable = $false # doesn't processes this section at all if $false
RemindersDisplayOnly = $false # prevents sending any emails (good for testing) - including managers
SendToDefaultEmail = $true # if enabled $EmailParameters are used (good for testing)
Reminders = 3, 9
UseAdditionalField = 'extensionAttribute12'
SendCountMaximum = 3
}The code checks AdditionalProperties for User & Manager, but it assumes it's a string - not multiple strings
PSPasswordExpiryNotifications/Public/Find-PasswordExpiryCheck.ps1
Lines 68 to 85 in 66cf5b7
| $UserManager = $CachedUsers["$($_.Manager)"] | |
| if ($AdditionalProperties) { | |
| # fix this for a user | |
| $EmailTemp = $_.$AdditionalProperties | |
| if ($EmailTemp -like '*@*') { | |
| $EmailAddress = $EmailTemp | |
| } else { | |
| $EmailAddress = $_.EmailAddress | |
| } | |
| # Fix this for manager as well | |
| if ($UserManager) { | |
| if ($UserManager.$AdditionalProperties -like '*@*') { | |
| $UserManager.Mail = $UserManager.$AdditionalProperties | |
| } | |
| } | |
| } else { | |
| $EmailAddress = $_.EmailAddress | |
| } |
This will require some advanced logic depending on which rule we're working on. Not a top priority as I guess it would be not likely that multiple rules would be running within the same domain with different overwrite email fields.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working