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

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: [sourcecode language=”powershell”] $newSMTP = <name of your new SMTP server> $SMTPChannels = Get-NotificationAction |Where-Object {$_.Name –imatch “smtp”} Foreach ($item in $SMTPChannels) { $item.Endpoint.PrimaryServer.Address = $newSMTP $item.Endpoint.update() } [/sourcecode]

Continue reading
%d bloggers like this: