Jump to content

Recommended Posts

Posted

$Email_Array = (Get-Content test2.csv)[0]

foreach ( $Email in $Email_Array){

Set-Mailbox "Dan Jump" -EmailAddresses @{add="$Email"}

}

 

 

I can't test it but I think that should work if all the emails are on separate lines.

 

If not you can add .split(",") to the end of the first line.

 

I do all my email management on office 365 which is exchange online 2013 but this should still work.

Posted

Thanks, I'll try it out. Next problem, I can get Excel to produce ipad1 -> ipad164 but as soon as I add the full email address it wont do it. It pastes ipad1,2,3,4 ipad1,2,3,4 Can you tell I don't use Excel!

 

You guessed right! Such a joy trying to get them configured and deployed!

Posted
If you just want a long list of commands you can use text columns with concatenate function to build a string fairly easily, then copy and paste as text into notepad. Used to do that for various things when it was quicker than working out and testing a loop

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...