I have a UWP app I created and want to use powershell to create a shortcut on the desktop.
Creating a shortcut is easy for an exe
$TargetFile = \"\\
To determine the correct TargetPath https://www.tenforums.com/software-apps/57000-method-open-any-windows-10-apps-command-line.html documents the required steps:
List all applications via Powershell:
get-appxpackage > %TEMP%\application_list.txt
Open list:
notepad %TEMP%\application_list.txt
Find the PackageFamilyName
for your app and navigate to the application's InstallLocation
using Windows Explorer
Opening the AppxManifest.xml
shows the Application ID:
Combine the PackageFamilyName!ApplicationID
to form your TargetPath
Microsoft.WinDbg_8wekyb3d8bbwe!Microsoft.WinDbg.DbgSrv64
for WinDbg Preview for instance.