Deploy Internet Shortcut with custom icon via Intune using Win32App

When we as IT People deploy Windows 10 AutoPilot we often get the feedback from users that they miss their shortcuts for SharePoint and such. For that reason I have created a manual which you can use to deploy this using a Win32App.


Create a folder where you store the files that you need to deploy. For example:

I am deploying a shortcut for my SharePoint Online environment. To deploy this shortcut I need to following files:

The install.cmd cointains the following code:

First we create 2 folders:
– C:\ProgramData\AutoPilotConfig
– C:\ProgramData\AutoPilotConfig\Icons

I always create these folders to run and store installation/removal scripts. For example, when you have a custom application which requires a custom removal script this is where I store these scripts.

After that we copy the 2 files to these folders and last but not least we run the Powershell script. This script contains this code:

If you want to deploy another Internet Shortcut then SharePoint Online please edit these values:

$path, is the value where the SharePoint is being stored.
$targetpath, is the URL where you want to lead the Shortcut too.
$iconlocation, is the value where the icon is stored.

Change these values and put another iconfile in the folder that you are going to package.


We are going to use WinAppUtil. This application is needed to package applications in Microsoft Intune. You can download it here: Link

Open Powershell, run the WinAppUtil.exe and use the following values:


Log on to the Intune Portal at

Go to Apps:

After that go to Windows and add an App:

Add a Win32App:

Select app package file and browse to the SharePointShortCut.intunewin file.

Specify the package information:

Specify the installation instructions:

Install command: “Install.cmd”
Uninstall command: del /f “C:\Users\Public\Desktop\SharePointOnline.url”
Device restart behavior: “no specific action”

Specify the requirements:

Use the following detection rule:

No depencies and no scope tags are assigned.

Assign the groups that need the application:

And we are done!

If you have any questions don’t hesitate to ask.



Related Posts

3 thoughts on “Deploy Internet Shortcut with custom icon via Intune using Win32App

  1. Hello Niels, thank you for this well-explained tutorial! I would like to know: is it possible to use this script to make a shortcut to a local folder? We use OneDrive Automount and I would like to automaticly place shortcuts to those folders. Thank you in advance!

    1. Hi Martijn,

      Thanks, I like to see that you used my post.

      You could use this script to create a shortcut to a folder:

      $create_shortcut = (New-Object -ComObject WScript.Shell).CreateShortcut
      $s = $create_shortcut.invoke(“c:\test.lnk”) # Must end in .lnk
      $s.TargetPath = “C:\temp”
      $s.IconLocation = “imageres.dll,3” # This is a reference to a folder icon
      $s.Description = “My Folder”

      If you have any questions don’t hesitate to ask!


Leave a Reply

Your email address will not be published. Required fields are marked *