Comments on: Add-SMTPAddresses.ps1 – Bulk Add SMTP Addresses to Office 365 Mailbox Users https://practical365.com/add-smtpaddresses-ps1-bulk-add-smtp-addresses-to-office-365-mailbox-users/ Practical Office 365 News, Tips, and Tutorials Fri, 08 Mar 2024 17:18:21 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_289753'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_289753"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/add-smtpaddresses-ps1-bulk-add-smtp-addresses-to-office-365-mailbox-users/#comment-289753 Fri, 08 Mar 2024 17:18:21 +0000 https://www.practical365.com/?p=8243#comment-289753 In reply to boe.

Possibly this might be a better script to base things on given that things have changed a lot since the article was written: https://office365itpros.com/2022/10/18/update-user-email-upns/

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_287968'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_287968"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/add-smtpaddresses-ps1-bulk-add-smtp-addresses-to-office-365-mailbox-users/#comment-287968 Thu, 22 Feb 2024 17:51:45 +0000 https://www.practical365.com/?p=8243#comment-287968 In reply to boe.

For shared mailboxes, I would use the mailbox alias for the aaddress.

]]>
By: boe https://practical365.com/add-smtpaddresses-ps1-bulk-add-smtp-addresses-to-office-365-mailbox-users/#comment-287873 Tue, 20 Feb 2024 18:45:40 +0000 https://www.practical365.com/?p=8243#comment-287873 Thanks – I made a slight change as we wanted email addresses like mary.smith@acme.com – however I didn’t quite get it right as it didn’t add a second address for shared mailboxes as they don’t have a first and last name – any suggestions?

$NewAddress = $null

#If -MakePrimary is used the new address is made the primary SMTP address.
#Otherwise it is only added as a secondary email address.
if ($MakePrimary)
{
$NewAddress = “SMTP:” + (Get-User $Mailbox).FirstName + “.” + (Get-User $Mailbox).LastName + “@$Domain”
}
else
{
$NewAddress = “smtp:” + (Get-User $Mailbox).FirstName + “.” + (Get-User $Mailbox).LastName + “@$Domain”
}

]]>
By: Gary https://practical365.com/add-smtpaddresses-ps1-bulk-add-smtp-addresses-to-office-365-mailbox-users/#comment-241965 Mon, 15 Aug 2022 14:46:05 +0000 https://www.practical365.com/?p=8243#comment-241965 Absolutely brilliant, slightly tweaked to my needs. This has saved me so much time, thank you so much.

]]>
By: Mike https://practical365.com/add-smtpaddresses-ps1-bulk-add-smtp-addresses-to-office-365-mailbox-users/#comment-234209 Thu, 08 Apr 2021 20:01:59 +0000 https://www.practical365.com/?p=8243#comment-234209 In reply to Mike.

Never Mind.

It had to do with authenticating to Exchange Online using Powershell 5.1. I installed Powershell 7 and it ran flawlessly.

Thanks Paul!

]]>
By: Mike https://practical365.com/add-smtpaddresses-ps1-bulk-add-smtp-addresses-to-office-365-mailbox-users/#comment-234198 Wed, 07 Apr 2021 14:53:36 +0000 https://www.practical365.com/?p=8243#comment-234198 I am getting when trying to run this against a single test account.

Get-AcceptedDomain : The term ‘Get-AcceptedDomain’ is not recognized as the name of a cmdlet

This is an M365 system only, no on-prem AD or directory sync.

]]>
By: Thomas https://practical365.com/add-smtpaddresses-ps1-bulk-add-smtp-addresses-to-office-365-mailbox-users/#comment-233587 Sun, 21 Feb 2021 10:46:43 +0000 https://www.practical365.com/?p=8243#comment-233587 In reply to Paul Cunningham.

Hi,
I always get this Answer. Whats wrong:

Cannot process argument transformation on parameter ‘Identity’. Cannot convert the “Thomas Barbara” value of type
“Deserialized.Microsoft.Exchange.Data.Directory.Management.Mailbox” to type
“Microsoft.Exchange.Configuration.Tasks.UserIdParameter”.
+ CategoryInfo : InvalidData: (:) [Get-User], ParameterBindin…mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-User
+ PSComputerName : outlook.office365.com

]]>
By: Allan Hall https://practical365.com/add-smtpaddresses-ps1-bulk-add-smtp-addresses-to-office-365-mailbox-users/#comment-232850 Tue, 05 Jan 2021 14:45:40 +0000 https://www.practical365.com/?p=8243#comment-232850 Paul, can this be run against a list of mailboxes, perhaps a list in a csv file?

]]>
By: Rick https://practical365.com/add-smtpaddresses-ps1-bulk-add-smtp-addresses-to-office-365-mailbox-users/#comment-231745 Wed, 21 Oct 2020 17:56:30 +0000 https://www.practical365.com/?p=8243#comment-231745 Perfect script. Does what it should with minimal instruction. Thank you for this. I can’t say enough about it.

]]>
By: Daniel Beato https://practical365.com/add-smtpaddresses-ps1-bulk-add-smtp-addresses-to-office-365-mailbox-users/#comment-231069 Tue, 01 Sep 2020 20:57:37 +0000 https://www.practical365.com/?p=8243#comment-231069 In reply to John.

I modified the script on the below link to be using Distribution Groups. However if you have AD Sync then it will use that instead.

https://github.com/dbeato/scripts/blob/master/Office%20365/ADD-SMTPAddress-DG.ps1

]]>