Set-RepositoryNotificationConfiguration



Summary

Set the repository notification configuration.

Syntax

Set-RepositoryNotificationConfiguration [[-Server] <String>] [[-Port] <Int32>] [[-Tls] <String>] [[-Username] <String>] [[-Password] <String>] [[-From] <String>] [[-FromName] <String>] [[-RemoveCredentials]] [<CommonParameters>]

Description

This function defines a notification SMTP server (and optionally, port) for an email server to be used to send failure notifications during unattended synchronization via Invoke-RepositorySync.

One or more recipients can then be added via Add-RepositorySyncFailureRecipient.

The directory must have been initialized via Initialize-Repository.

The function must be invoked inside a directory initialized as a repository.

Parameters

Name Argument Description
Server <String> The server name (or IP) for the outgoing mail (SMTP) server
Port <Int32> Specifies a port for the SMTP server. If not provided, the default IANA-assigned port 25 will be used.
Tls <String> Specifies whether to use SSL/TLS. The value may be "true", "false", or "auto". "Auto" will automatically set SSL to true when the port is changed to a value different than 25. By default, TLS is false.
Username <String> Specifies the SMTP server username for authenticated SMTP servers. If username is not specified, connection will be made without authentication.
Password <String> Specifies the SMTP server password for authenticated SMTP servers.
From <String> Specifies the email address from which the notification will appear to originate. Note that in servers may accept emails from specified
domains only, or in some cases may require the email address to match the username.
FromName <String> Specifies the from address display name.
RemoveCredentials Removes the SMTP server credentials without removing the entire mail server configuration.

Examples


PS C:\> Set-RepositoryNotificationConfiguration smtp.mycompany.com

See also