SCOM: Using PowerShell to update SMTP server address in SMTP notification Channels

less than 1 minute read

I’ve been asked a question on how to bulk update SMTP server addresses in SMTP notification channels using PowerShell.

Here’s the script to run in OpsMgr Command Shell:

$newSMTP = "name of your new SMTP server";
$SMTPChannels = Get-NotificationAction |Where-Object {$_.Name imatch "smtp"}
Foreach ($item in $SMTPChannels)
  $item.Endpoint.PrimaryServer.Address = $newSMTP

Leave a comment