Importing bulk commands into Exchange 2010 Powershell
Posted on 2013-11-13
We currently have a list of email accounts (email@example.com) along with corresponding Mail Contacts for a forwarding address (firstname.lastname@example.org)
Using the command
set-mailbox -identity John.Doe -ForwardingAddress "John.Doe@bbb.com" -DeliverToMailAndForward $false
When looking at the mailflow settings, it all appears fine and works.
We have 200+ of these to do and would like to know the best way to do this
I have tried to use the above command and have 200+ individual lines of the code on a csv file and then tried to import using Import-CSV c:\mail.csv
When this runs, it just displays the contents of the CSV file and doesn't seem to run the command.