Office 365 – Changing a Username

Recently, i’ve been doing quite a bit of work with clients who have needed to change their usernames in Office 365 for one reason or another and have having difficulty.

In some cases they have managed to update it through the portal, but more often than not, its not quite worked properly and they have needed to change the User Principal Name manually using Powershell.

The good news is that its really straightforward to do. Infact, it’ll probably take you longer to get connected to Office 365 than it will to change the User Principal Name for a user.

Changing a single users User Principal Name
Once your connected (see my blog post on connecting to Office 365) you can simply run the powershell:

#Changing the UserPrincipalName for a single user
Set-MsolUserPrincipalName -UserPrincipalName "myOldUpn@mydomain.co.uk" -NewUserPrincipalName "myNewUpn@mydomain.co.uk"

This will do simply that, load the object for the user and change their Upn.

If you wanted to do that with variables to make things a little tidier you can:

#Chaning the UserPrincipalName for a single user - using variables
$oldUPN = "myOldUpn@mydomain.co.uk"
$newUPN = "myNewUpn@mydomain.co.uk"
Set-MsolUserPrincipalName -UserPrincipalName $oldUPN -NewUserPrincipalName $newUPN

Changing more than one
This works really nicely, but last week I had a customer who wanted to change around 30 for various reasons, so I had them make a CSV file to hold the details in 2 columns:

upnchanges.csv
oldUpn,newUpn
oldUpn@domain.com,newUpn@domain.com
oldUpn2@domain.com,newUpn@domain.com

Once they’d generated this file, I simply used the below to change the User Principal Name for everyone in the CSV.

#Using a CSV File to change the UPN's
$path = "c:\pathtomycsv\upnChanges.csv"
Import-csv -path $path | 
foreach-object `
{ 
  Set-MsolUserPrincipalName -UserPrincipalName $_.oldUPN -NewUserPrincipalName $_.newUPN
}

 

Salamander Active Directory – Feature Focus – Calendars

One of the most used features of Salamander Active Directory is the ability to import Pupil and Staff Timetables into Exchange, both on-premise and in Office 365.

A Staff Calendar from SIMS.net displaying in Exchange 2013

A Staff Calendar from SIMS.net displaying in Exchange 2013

Categorisation
Events can be categorised to suit your needs. Here we have events which are categorised by Subject, but this could equally be the Year of the group or the Room.

cal2

 

Salamander Active Directory – Exchange Calendars

How much does it cost?
This feature is built into Salamander Active Directory at no extra cost.

This is available to all Salamander Active Directory customers using Sims.net/Facility CMIS or iSAMS, with Exchange 2007/10/13 on-premise or Exchange Online.

Salamander Soft
For more information about salamander soft or our products, please contact us: info@salamandersoft.co.uk or visit our website: www.salamandersoft.co.uk