Synkronisering av användarkonton och e-postlistor från Scoutnet till Office 365
Summarizes a synchronization run from the log file.
Reads the log file written by Write-SNSLog and returns a short text summary: status, run time, number of errors and warnings, and what the run did for distribution groups, contacts, user accounts, Microsoft 365 groups and shared mailboxes. Errors and warnings are listed, up to MaxListedMessages of each; the rest are counted. The text is meant to be placed first in the mail with the log. Call it after the last synchronization step, before the log is sent.
Get-SNSRunSummary [[-Configuration] <Object>] [[-LogFilePath] <string>] [[-MaxListedMessages] <int>] [<CommonParameters>]
Type: Object; optional.
The configuration. The log file is taken from its LogFilePath. If omitted, the current module configuration is used.
Type: String; optional.
Path to a log file to summarize. Overrides the path in the configuration.
Type: Int32; optional.
Maximum number of errors and of warnings to list. The rest are counted. Default is 20.
$summary = Get-SNSRunSummary -Configuration $conf
$bodyData = $summary + [Environment]::NewLine + (Get-Content -Path $conf.LogFilePath -Raw -Encoding UTF8)
Puts the summary first in the mail body, followed by the full log.