You can use the Get-AppXPackage cmdlet in PowerShell to display only the version of an app package by chaining it with the Select-Object cmdlet. Here is an example of how you can use these cmdlets to display only the version of an app package:
Copy code
Get-AppXPackage -Name "Microsoft.WindowsCalculator" | Select-Object -ExpandProperty Package | Select-Object -ExpandProperty Version
In this example, the Get-AppXPackage cmdlet is used to retrieve the app package for the Calculator app (Microsoft.WindowsCalculator), and the Select-Object cmdlet is used to display only the Version property of the package.
You can also use -Name parameter to filter the package you want, and use -AllUsers to include all users package.
Copy code
Get-AppXPackage -AllUsers -Name "Microsoft.WindowsCalculator" | Select-Object -ExpandProperty Package | Select-Object -ExpandProperty Version
This will give you the version of the Calculator app for all users of the device.