Wednesday, October 20, 2010

MS Exchange 2007- Adding email addresses thru powershell

For all those guys who are beginners in power-shell , here is a cool tip:

Fist get the mail box thru Get-mailbox command

$mailbox = get-mailbox vikas

Second get in to multivalued attribute & add one more value

$mailbox.emailaddresses+="abc@xyz.com",a.bc@xyz.com"

Third set the value using pipe & set mailbox

$mailbox | set-mailbox

No comments:

Post a Comment