Bulk Rewrite of Display Name

A customer wanted to identify their employees by department when they were emailing people to ensure that people knew who they were dealing with, ex Sales, Finance, Legal Etc.

This script will import a CSV file with a list of existing usernames and prepend the title “Sales-” to their display name.

$UserDetails=Import-Csv SalesUsers.csv

foreach($ID in $UserDetails) {

	Write-Host $ID.Name

	$DisplayName = "Sales- " + $ID.Name

	set-user -Identity $ID.Name -DisplayName $DisplayName -Name $DisplayName

	}