Synkronisering av användarkonton och e-postlistor från Scoutnet till Office 365
Sends reminders to members who need to do or renew a mandatory moment.
Sends one mail to each member who is older than MandatoryMomentMinimumAge, has at least one non-excluded role and has a moment (Trygga moten or Registerutdrag) that is missing or expires within MandatoryMomentReminderDaysBefore days. The mail goes to the member’s e-mail address in Scoutnet, with contact_alt_email as fallback, and to MandatoryMomentReminderCc as a copy. Members listed in MandatoryMomentCourseExemptMembers or MandatoryMomentPoliceCheckExemptMembers are not reminded about that moment.
Reminders are sent once per period, set by MandatoryMomentReminderFrequency. The texts and links in the mail are taken from the MandatoryMomentReminder* and Mandatory*ReminderText/Links settings. A failure for one member is logged as an error and does not stop the others.
Send-SNSMandatoryMomentReminder [[-Configuration] <Object>] [[-Memberlist] <IDictionary>] [[-LastSentValue] <Object>] [[-AsOfDate] <datetime>] [[-TestEmailAddress] <string>] [[-FrequencyOverride] <string>] [<CommonParameters>]
Type: Object; optional.
The configuration. Defaults to the current SNS configuration.
Type: IDictionary; optional.
Optional Scoutnet member list. When omitted, it is fetched using the member list credential.
Type: Object; optional.
Raw value of the MandatoryMomentReminderLastSent Automation variable. An empty, missing or invalid value makes the reminders run regardless of the configured frequency.
Type: DateTime; optional.
Date used for frequency, ages and validity. Defaults to today.
Type: String; optional.
Test mode. All reminders are sent to this address instead of the members and MandatoryMomentReminderCc is not used.
Type: String; optional.
$lastSent = Get-AutomationVariable -Name 'MandatoryMomentReminderLastSent'
if (Send-SNSMandatoryMomentReminder -Configuration $conf -LastSentValue $lastSent) {
Set-AutomationVariable -Name 'MandatoryMomentReminderLastSent' -Value (Get-Date -Format 'o')
}