Skip to content

Instantly share code, notes, and snippets.

@itsthedoc
Last active June 17, 2019 01:14
Show Gist options
  • Save itsthedoc/f47a03c846bdf70e5275feb7959ca0bd to your computer and use it in GitHub Desktop.
Save itsthedoc/f47a03c846bdf70e5275feb7959ca0bd to your computer and use it in GitHub Desktop.
Quick example of getting mailboxes and setting addresses
### assuming mailboxes.txt has full primary addresses or primary alias names
$mailboxes = get-content mailboxes.txt
$mailboxes | % {
$name = Get-Mailbox $_ | select -ExpandProperty alias
Set-Mailbox $_ -EmailAddresses SMTP:[email protected],[email protected] -WhatIf
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment