Update Powershell through command line
https://superuser.com/questions/1287032/update-powershell-through-command-line
Run this command :
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
And then run the MSI with your parameters.
After this you need to update the modules.
Reference:
https://www.thomasmaurer.ch/2019/03/how-to-install-and-update-powershell-6/
https://www.thomasmaurer.ch/2019/02/update-powershellget-and-packagemanagement/