Fix winget When Running PowerShell as Administrator
Symptom: winget works in your normal session, but in Run as administrator (a different admin account) it's not recognized or fails with source errors.
In the elevated PowerShell run:
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe
winget source update
If winget is still not recognized, register App Installer too:
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
Then you can upgrade packages as usual:
winget upgrade --all
More info.
Related: update all apps silently with winget.