Office365-Scoutnet-synk

Synkronisering av användarkonton och e-postlistor från Scoutnet till Office 365


Project maintained by Scouterna Hosted on GitHub Pages — Theme by mattgraham

Get-SNSRunSummary

Summarizes a synchronization run from the log file.

Description

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.

Syntax

Get-SNSRunSummary [[-Configuration] <Object>] [[-LogFilePath] <string>] [[-MaxListedMessages] <int>] [<CommonParameters>]

Parameters

-Configuration

Type: Object; optional.

The configuration. The log file is taken from its LogFilePath. If omitted, the current module configuration is used.

-LogFilePath

Type: String; optional.

Path to a log file to summarize. Overrides the path in the configuration.

-MaxListedMessages

Type: Int32; optional.

Maximum number of errors and of warnings to list. The rest are counted. Default is 20.

Examples

Example 1

$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.