I think the alias can be used for login by default (I use alias to login to my outlook account).
You can have all relevant data in csv and can consume the attributes in the same way you did for step 1 in the same Foreach-Object scriptblock for step 2.
I think the alias can be used for login by default (I use alias to login to my outlook account).
You can have all relevant data in csv and can consume the attributes in the same way you did for step 1 in the same Foreach-Object scriptblock for step 2.
[/quote]
Thank you, I am a total noob at this and those links are quite confusing unfortunately.
I’ve messed up formatting on my previous replies and I guess they were scraped, so here is my reply with proper formatting:
Hello Mark,
Set the new alias as primary: EmailAddresses property show all emails for the mailbox. Primary email is prefixed with SMTP (all caps) and all aliases are prefixed with smtp (all lowercase).
Example:
So in your case, because you are adding email address to already existing collection of email addresses I would get current primary email address, remove it from collection and added new one with SMTP prefix and old one with smtp prefix.
Something like this:
Thank you, this does make sense but how would I script it for 600+ users when not all of them will be receiving the new primary?
I also considered simply using this command to set them all.
Set-Mailbox -identity currentprimary@xxx.com -WindowsEmailAddress newprimary@yyy.com (I am struggling trying to figure out how to use an input file with the old and new addresses like I did with adding the new address)
Point 3 was their AAD logon that needs to be updated to the same as their primary SMTP.