Set-TssEmailConfiguration
SYNOPSIS
Set the outgoing email configuration
SYNTAX
Set-TssEmailConfiguration [-TssSession] <Session> [-FromEmailAddress <String>] [-FromEmailName <String>]
[-SendEmailAppRegistrationSecretId <Int32>] [-SendEmailMethod <String>] [-SmtpCheckCertificateRevocation]
[-SmtpDomain <String>] [-SmtpPassword <SecureString>] [-SmtpPort <Int32>] [-SmtpServer <String>]
[-SmtpUseCredentials] [-SmtpUseImplicitSSL] [-SmtpUserName <String>] [-SmtpUseSSL]
[-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Set how Secret Server sends email: SMTP server, port, SSL mode and credentials, or an Office 365 app registration. Only the parameters you pass are sent; everything else keeps its current value. Returns the full email configuration after the update.
EXAMPLES
EXAMPLE 1
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
Set-TssEmailConfiguration -TssSession $session -SmtpServer smtp.example.com -SmtpPort 587 -SmtpUseSSL -FromEmailAddress secretserver@example.com
Send email through smtp.example.com on port 587 over SSL
EXAMPLE 2
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
$smtpCred = Get-Credential
Set-TssEmailConfiguration -TssSession $session -SmtpUseCredentials -SmtpUserName $smtpCred.UserName -SmtpPassword $smtpCred.Password
Authenticate to the SMTP server with the supplied account
PARAMETERS
-TssSession
TssSession object created by New-TssSession for authentication
Type: Session
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-FromEmailAddress
Address every outgoing email is sent from
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-FromEmailName
Display name on outgoing email
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SendEmailAppRegistrationSecretId
Id of the secret holding the Azure app registration used when SendEmailMethod is O365
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-SendEmailMethod
How email is sent: Smtp or O365
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SmtpCheckCertificateRevocation
Check certificate revocation when using implicit SSL
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-SmtpDomain
Domain of the SMTP account
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SmtpPassword
Password of the SMTP account
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SmtpPort
SMTP port, 25 by default
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-SmtpServer
Host name of the outgoing SMTP server
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SmtpUseCredentials
Authenticate to the SMTP server; pass -SmtpUseCredentials:$false for anonymous SMTP
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-SmtpUseImplicitSSL
Use implicit SSL (SMTPS) instead of STARTTLS
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-SmtpUserName
User name of the SMTP account
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SmtpUseSSL
Connect to the SMTP server over SSL
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
Thycotic.PowerShell.Configuration.EmailConfiguration
NOTES
Requires TssSession object returned by New-TssSession