Question: how to change primary email address in powershell?
Answer: Run the PowerShell as administrator;
To run the scripts needed to change a user's primary email address we must first set the script execution policy. ... 
The execution policy needs to be RemoteSigned. ... 
Now Get-ExecutionPolicy returns RemoteSigned;