This script can be used for changing the UPN of multiple users based on a CSV File.

Before starting, Please ensure that the following values are properly updated.

1) $oldSuffix = '' [Your Current UPN]

2) $newSuffix = '' [Proposed new UPN]

3) Input File Name - userlist.csv

Input file should be a CSV file with loginid as the header and each line containing one samaccountname.

Please test the script with a small user base first always.

Active Directory Module should be installed and should import the module if required.