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
[floated align=”left”]Office 365[/floated] Admin Center is, usually, the preferred interface for performing administrative tasks. When it comes to bulk operations, though, PowerShell is the way to go. We’ve already demonstrated how to connect to Office 365 using remote PowerShell, and how to bulk create, license, and modify users. For your convenience, we’ve also demonstrated how to automate the process of connecting to Office 365 by creating/editing your PowerShell profile.
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
===================
bulk-change-UPN.ps1
===================
# Import data from a CSV file and store it in a variable “$data”
$data = import-csv $args[0]
$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 [tip label=”Text File with Commands” style=”1″ href=”https://www.netometer.com/blog/wp-content/uploads/Office-365-Commands.txt”]Office-365-Commands.txt [/tip] and [tip label=”PowerShell script” style=”1″ href=”https://www.netometer.com/blog/wp-content/uploads/bulk-change-UPN.ps1″]bulk-change-UPN.ps1 [/tip] that we are using in the demo.
- How to Connect to Office 365 Using Remote PowerShell. Bulk Creating and Managing Users
- Exchange 2013 – Custom Receive HubTransport Connector Problem
- How to Bulk Create Mailboxes in Exchange 2013
- How to Install Exchange 2013