ALL CREDIT for this script goes to alkampfergit & nouseforname.
This is just an step-by-step instruction for dumb people like me.
> winget upgrade --all
Note: PowerShell Execution Policy must be set to Unrestricted or RemoteSigned.
-
Run PowerShell as admin
-Check policy:
Get-ExecutionPolicy
-Set policy:
Set-ExecutionPolicy Unrestricted
orSet-ExecutionPolicy RemoteSigned
-
Create .txt file
-Copy/Paste code
-change/adjust desired package ID (e.g. Winamp.Winamp)
$skipUpdate = @(
'Winamp.Winamp',
'Github.Atom'
)
-save file with file extension .ps1 or save as .txt, then rename .ps1 (e.g. upgrade-restriction.ps1)
-
Run PowerShell as admin
-Change directory:
cd c:\path\to\script
-Execute script:
.\upgrade-restriction.ps1