I had a function to get the SMTP configuration here :
Code: Select all
function Get-VeeamNotification
{
Write-Host "$(Get-Date -Format HH:mm:ss) - SMTPSettings"
$SMTP = Get-VBRMailNotificationConfiguration
$SMTPStatus = $SMTP.Enabled
[PsCustomObject]@{
Status = $SMTPStatus
Server = if($SMTPStatus) {$SMTP.SmtpServer} else {"<N/A>"}
Port = if($SMTPStatus) {$SMTP.Port} else {"<N/A>"}
SSL = if($SMTPStatus) {$SMTP.SSLEnabled} else {"<N/A>"}
#if SMTP enabled and Authentication required
Account = if($SMTPStatus -and $SMTP.AuthEnabled) {$SMTP.credentials.name} else {"<N/A>"}
Sender = if($SMTPStatus) {$SMTP.Sender} else {"<N/A>"}
Recipient = if($SMTPStatus) {$SMTP.Recipient} else {"<N/A>"}
Subject = if($SMTPStatus) {$SMTP.Subject} else {"<N/A>"}
DailyReport = if($SMTPStatus -eq $true) {$SMTP.DailyReportsTime.ToShortTimeString()} else {"<N/A>"}
NotifyOnSuccess = if($SMTPStatus) {$SMTP.NotifyOnSuccess} else {"<N/A>"}
NotifyOnWarning = if($SMTPStatus) {$SMTP.NotifyOnWarning} else {"<N/A>"}
NotifyOnFailure = if($SMTPStatus) {$SMTP.NotifyOnFailure} else {"<N/A>"}
}
Write-Host "$(Get-Date -Format HH:mm:ss) --------------------"
}
Now there are some change with integration of modern authentication for google + M365 and I don't find new cmdlet.
I would like to know how to get these informations :
1) Get authentication used :
SMTP server / google gmail modern / M365 modern
2) For google modern :
Use custom application registration enabled or not
if enabled get application client ID + secret
3) For M365 modern
Use custom application registration enabled or not
if enabled get application client ID + Tenant ID
Thanks for your help