Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HewlettPackard/POSH-HPEOneView/llms.txt

Use this file to discover all available pages before exploring further.

Synopsis

Get the current SMTP server and email alert configuration from an HPE OneView appliance.

Syntax

Get-OVSMTPConfig
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

Description

Get-OVSMTPConfig retrieves the SMTP email notification settings configured on the appliance. The returned object contains the mail server hostname, port, connection security mode, sender address, and the current state of alert email notifications. This cmdlet is typically used to review the current settings before making changes with Set-OVSmtpConfig, or to confirm that email alerting is enabled after configuration.

Parameters

ApplianceConnection
Object
Specify one or more appliance connection objects or names. Defaults to the default connection in $ConnectedSessions.

Examples

Retrieve the SMTP configuration from the default appliance

Get-OVSMTPConfig

Retrieve SMTP configuration from a named appliance connection

Get-OVSMTPConfig -ApplianceConnection 'MyAppliance.domain.com'

Check whether alert email notifications are enabled

$smtp = Get-OVSMTPConfig
if ($smtp.alertEmailEnabled)
{
    Write-Host "Email alerting is enabled. Server: $($smtp.smtpServer)"
}
else
{
    Write-Warning "Email alerting is disabled."
}

Retrieve SMTP config from multiple appliances

$ConnectedSessions | Get-OVSMTPConfig

Output

HPEOneview.Appliance.SmtpConfiguration Key properties of the returned object:
PropertyTypeDescription
smtpServerStringHostname or IP address of the SMTP server
smtpPortIntTCP port used for SMTP connections
smtpProtocolStringConnection security mode (None, TLS, StartTls)
senderEmailAddressStringFrom address used for outbound alert emails
alertEmailEnabledBooleanWhether email alerting is globally enabled
alertEmailFiltersArrayList of defined email alert filter rules
ApplianceConnectionObjectAppliance the configuration was retrieved from

Build docs developers (and LLMs) love