Link to home
Start Free TrialLog in
Avatar of Pete Long
Pete LongFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Read usernames and email addresses, from CSV

Quick one,

If I have a csv file like so

Source-User ,                  Target-Mailbox
usera,                                usera@office365.com
userb,                                userb@office365.com
etc....

And I want to read/loop the users into the following command;

Set-Mailbox -Identity “usera” -DeliverToMailboxAndForward $true -ForwardingSMTPAddress usera@office365.com


What syntax do I use to script that?

Regards

Pete
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pete Long

ASKER

Hi oBdA, thanks for the reply, testing........

P
....Works a treat, ThanQ

Regards

P