Bulk Operations and Common Tasks
- Add a Domain to Office 365 and Configure DNS Records
- Edit PowerShell Profile and Automate Remote Connection to Office 365 and Exchange Online
- Bulk Modify User Principal Names and Email Addresses
In this video, we go through the next logical steps:
- Adding a domain
- Configuring PowerShell for Remote Connection to Exchange Online
- Exporting the Existing User Accounts to a CSV file
- Bulk Editing User Principal Names and E-mail Addresses
# Import data from a CSV file and store it in a variable "$data"
$data = import-csv $args
$Old_Domain = "NetoMeter.onmicrosoft.com"
$New_Domain = "3demo.com"
foreach ($i in $data)
$UPN = $i.UserPrincipalName
$New_UPN = $UPN -replace $Old_Domain, $New_Domain
Set-MsolUserPrincipalName -UserPrincipalName $UPN -NewUserPrincipalName $New_UPN
Again, we’ll be using PowerShell for the tasks that require performing bulk operations.
You can download the Text File with CommandsOffice-365-Commands.txt and PowerShell scriptbulk-change-UPN.ps1 that we are using in the demo.