Desktop shortcuts can be an essential part of any Windows user's experience, providing quick and easy access to frequently used applications. As an IT pro managing Intune environments, you'll often need to create and deploy desktop shortcuts to ensure users have easy access to the tools they need to be productive. While I try to avoid pre-defined shortcuts and end-user customization as much as possible, there are some cases where it can be helpful to have these pre-defined icons on your users' desktops.
This article walks you through the process of creating desktop shortcuts for Windows applications using PowerShell and Intune to streamline your deployment efforts.

Table of Contents

What are "Windows Apps"?

Windows apps, also known as desktop apps or packaged apps, are software applications designed to run on the Windows operating system. They are seamlessly downloaded from the centralized Microsoft Store, providing users with a vast library of options. Packaged apps represent a newer generation of Windows apps, offering enhanced security and reliability compared to traditional executable files. Installation occurs directly through the Microsoft Store, fostering a tight integration with the Windows operating system. This integration enables seamless updates and simplified deployment, streamlining app management for IT administrators.

  • Seamless updates: Packaged apps benefit from automatic updates through the Microsoft Store, ensuring users always have the latest app version.
  • Easy deployment: Intune, a comprehensive device management platform, facilitates the effortless deployment of packaged apps across devices, saving IT admins time and effort.

Overall, packaged apps present a compelling choice for organizations seeking secure, reliable, and easily manageable software solutions for their users.

Creating Desktop Shortcuts with PowerShell

The challenge with Windows Apps is that their name and path to the application is not just an EXE in "Program Files". To create a shortcut, we first need to get the PackageFamilyName, which looks like ProgramName_PublisherID.

In this example I will create the shortcut for the "new Teams client".

So let's start with getting the PackageFamilyName.
For that we use PowerShell and search for the package:

Get-AppxPackage MSTeams
Code language: PowerShell (powershell)
Get Windows App Infos

This will give us the PackageFamilyName. If you are not sure what the name of the application is, you can also search with asterisks for example:

Get-AppxPackage *Teams*
Code language: PowerShell (powershell)

Now that we have our PackageFamilyName, we can create the PowerShell script.
To do this, combine the PackageFamilyName with the application Name with an explanation mark (!) in between.

Here is the example with teams, note the first line:

$AppLink = "MSTeams_8wekyb3d8bbwe!MSTeams"
$ShortuctName = "Teams"
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut("$([Environment]::GetFolderPath("Desktop"))\$ShortuctName.lnk")
$Shortcut.Arguments="shell:AppsFolder\$AppLink"
$Shortcut.TargetPath = "shell:AppsFolder\$AppLink"
$Shortcut.Save()
Code language: PowerShell (powershell)

Deploy the Desktop Shortcuts trough Intune

While PowerShell is effective for creating individual desktop shortcuts, Intune provides a centralized management solution to streamline the process. To create desktop shortcuts at scale using Intune, we'll simply use the same script we created above and distribute it to our users through the scripting feature:

  1. Open Intune
  2. Navigate to:
    Devices > Windows > Scripts and remediations
  3. Switch to the tab Platform scripts.
  4. And hit Add.
  5. Give the script a name (ex. WIN-U-TeamsShortcut)
  6. Upload your PowerShell script.
  7. For the settings choose:
    • Run this script using the logged-on credentials: Yes
    • Enforce script signature check: No
    • Run script in 64-bit PowerShell: Yes
  8. A Scope tag is not needed in most cases.
  9. In the Assignments add a group that suits your needs.
  10. That's it.

Manually create a Shortcut for a Windows App

If you want to create a shortcut for yourself, you can do so by following these steps:

  1. Open the Application Folder
    • Press [Windows] + [R].
    • Type "shell:AppsFolder" and hit OK.
  2. Locate your App you want a shortcut to.
  3. Right click on it and choose "Create shortcut"
  4. Ther will be a warning, that the shortcut can't be createt here. Hit Yes, to create it on your desktop.
  5. And that's it. Now you have your Windows App shortcut on your Desktop.

Conclusion

In conclusion, creating desktop shortcuts for Windows Apps is a straightforward process that can be accomplished using PowerShell and Intune. By following the steps outlined in this article, you can effectively manage and deploy desktop shortcuts to ensure that users have easy access to the applications they need. Whether you're creating shortcuts for individual users or deploying them at scale across an organization, the methods provided here offer a reliable and efficient solution.