i dont know how to script and i am learning everyday new things i can do with powershell.
i have two lists that i need to apply. there are a current set of users that have an existing email address and i need to forward them to a new email address. the below command helps me achieve this while maintaining their existing accounts.
Set-Mailbox firstname.lastname@example.org -ForwardingSmtpAddress email@example.com -DeliverToMailboxAndForward $True
here is my stab at this
$CurrentEmails = get-content c:\temp\currentemails.txt
$newemails = get-content c:\temp\newemails.txt
set-mailbox $currentemails -forwardingsmtpaddress $newemails -delivertomailboxandforward $true