how to get application guid powershell

Shell
Get-CimInstance Win32_Product | Sort-Object -Property Name | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize
Source

Also in Shell: