Quantcast
Channel: Microsoft Office 365
Viewing all articles
Browse latest Browse all 17713

O365 change part of the displayname - bulkmode

$
0
0

HI,

I need to change the displayname of multiple users from John Doe - 2016 to John Doe - 2017

and the department from 2016 to 2017 too... 

the problem is that I need to do this for multiple users! exemple :

John Doe1 -2016

Jimmy smith - 2016 ....

I have Script that finds all the users in the 2016 department

$liveCred=Get-Credential
import-Module MSONLINE
Connect-MSOLService -Credential $liveCred
Get-MsolUser -DomainName "email@email.com" -all | Where {$_.department -match "2016" } | select Userprincipalname,displayname,department

but how can I change the users displayname to be the first name + last name + department ???


Viewing all articles
Browse latest Browse all 17713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>