Hi Azim Iqbal ,
To see if you receive different results, please try changing this line:
$CSVrecords = Import-Csv C:\Windows\system32\TempAzureADUserAttributesNSS12.csv -Delimiter ";"
To the following:
$CSVrecords = Import-Csv C:\Windows\system32\TempAzureADUserAttributesNSS12.csv
Also, please try displaying your file to ensure that Windows isn't adding a double extension:
Let me know if this helps and if you are still facing this issue. There are some troubleshooting steps for that script offered in this thread: [https://techcommunity.microsoft.com/t5/windows-powershell/bulk-update-azure-ad-with-user-attributes-from-csv/m-p/1374479
If the information helped you, please Accept the answer. This will help us and also improve discoverability for others in the community who might be researching similar information.
That's odd since Powershell errors are usually pretty accurate. Is the file in the right location? Does it have the right name? Is the spelling accurate? Are there any mismatched spaces or characters? If you display the file does it show up correctly?