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 ???