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

Posted by Tao Yang on 10/12/2011 in SCOM |

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

Tags: ,

Leave a Reply

Copyright © 2010-2014 Tao Yang's System Management Blog All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.2.4.1, from BuyNowShop.com.