The real magic word
You're viewing a single thread.
PowerShell: right clicks and selects run as administrator, loses previous session
Today you can use an inline "RunAs" command such as "runas /user:Administrator "powershell.exe -executionpolicy bypass -command Set-Location "$PWD"; .\install.ps1"
Or you could use Gsudo.
Additionally, Sudo will soon be available in Win11.
That's cultural appropriation.
Why? Because GUI shell = session...