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

Configure SMTP server address, port, connection security, authentication, sender address, and global alert email state.

Syntax

Default — configure SMTP settings

Set-OVSmtpConfig
    [-SenderEmailAddress <String>]
    [-Server <String>]
    [-Port <Int32>]
    [-ConnectionSecurity <String>]
    [-Password <Object>]
    [-AlertEmailEnabled]
    [-UseMXRecordLookup]
    [-Async]
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

Disabled — disable alert email notifications

Set-OVSmtpConfig
    -AlertEmailDisabled
    [-Async]
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

Description

Set-OVSmtpConfig configures the SMTP email notification settings on the appliance. You can set the outbound mail server, TCP port, transport security, authentication password, and the sender email address. You can also globally enable or disable alert email notifications. Once SMTP is configured, use Add-OVSmtpAlertEmailFilter to define which alerts are sent and to which recipients. By default, the cmdlet waits for any resulting async task to complete before returning. Pass -Async to receive the task object immediately and manage completion yourself with Wait-OVTaskComplete.

Parameters

SenderEmailAddress
String
The “From” email address used for all outbound alert notifications. Must be a valid RFC 5321 email address.
Server
String
Hostname or IP address of the SMTP relay server.Alias: -SmtpServer
Port
Int32
TCP port number for the SMTP connection. Common values: 25 (plain), 587 (STARTTLS), 465 (TLS).Alias: -SmtpPort
ConnectionSecurity
String
Transport-layer security mode for the SMTP connection. Valid values:
  • None (default) — plain text
  • TLS — implicit TLS
  • StartTls — opportunistic STARTTLS
Password
Object
Authentication credential for the SMTP server. Accepts a SecureString or a plain-text String. When a SecureString is provided, it is decrypted internally before being sent to the API.
AlertEmailEnabled
SwitchParameter
Enable global alert email notifications. Mutually exclusive with -AlertEmailDisabled.
AlertEmailDisabled
SwitchParameter
Disable global alert email notifications. When used, this is the only required parameter besides -ApplianceConnection.
UseMXRecordLookup
SwitchParameter
Configure the appliance to resolve the mail server via DNS MX record lookup rather than using a static -Server value.
Async
SwitchParameter
Return the async task object immediately without waiting for completion. Use Wait-OVTaskComplete to monitor the task.
ApplianceConnection
Object
Specify one or more appliance connection objects or names. Defaults to the default connection in $ConnectedSessions.

Examples

Configure basic SMTP with a sender address

Set-OVSmtpConfig -Server 'smtp.corp.example.com' -Port 25 -SenderEmailAddress 'oneview-alerts@corp.example.com' -AlertEmailEnabled

Configure SMTP with STARTTLS and authentication

$cred = Get-Credential -UserName 'oneview@corp.example.com' -Message 'SMTP password'
Set-OVSmtpConfig -Server 'smtp.office365.com' -Port 587 -ConnectionSecurity StartTls -SenderEmailAddress 'oneview@corp.example.com' -Password $cred.Password -AlertEmailEnabled

Disable all email alerting

Set-OVSmtpConfig -AlertEmailDisabled

Configure asynchronously

$task = Set-OVSmtpConfig -Server 'smtp.corp.example.com' -Port 25 -AlertEmailEnabled -Async
$task | Wait-OVTaskComplete

Output

When -Async is not used: the cmdlet waits for task completion and returns nothing on success. When -Async is used: HPEOneview.Appliance.TaskResource — the async task object.

Build docs developers (and LLMs) love