If you need to deploy a MS Store App for example through Intune or GPO, here is my script:
First of all you need the App ID of the store app. Go to https://apps.microsoft.com/ search for the app and select it. In the URL you will see something like this: https://apps.microsoft.com/detail/9nw77489ngj0?hl=en-us&gl=US. 9nw77489ngj0 is the App ID.
Now the script:
Start-Transcript -Path “C:\3cx_msstore.log”
$appid=”9NW77489NGJ0″
winget install -e –id $appid –source msstore –accept-source-agreements –accept-package-agreements
winget upgrade –id $appid
Stop-Transcript
Reading time: 1 min