28 January, 2022

How to deploy custom URL shortcuts with Microsoft Intune

This article will describe how to deploy custom URL shortcuts with Microsoft Intune.

Welcome to my first post in my “Cases from the Field” series. This series will describe things I’ve done during the projects I’ve worked on as a Modern Workplace Consultant.

Let me briefly describe what our customer requested. They use 2 web applications and want them as a URL shortcut on their Windows 10 enrolled device. Instead of doing this manually for all their devices, they asked if it is possible to do this with Microsoft Intune.

To make this possible I’ve deployed a Powershell script with Microsoft Intune. The script is very simple:

$new_object = New-Object -ComObject WScript.Shell
$destination = $new_object.SpecialFolders.Item("AllUsersDesktop")
$source_path = Join-Path -Path $destination -ChildPath "\\Salesforce.url"
$source = $new_object.CreateShortcut($source_path)
$source.TargetPath = "http://login.salesforce.com"

This Powershell script creates a custom URL shortcut and places it in the Public Desktop folder of your Windows 10 device. In this case, it will place a URL shortcut “Salesforce” and this will go to https://login.salesforce.com/


How to deploy custom URL shortcut with Microsoft Intune

Now let me show you how to deploy this Powershell Script with Microsoft Intune.

Step 1: Create a Powershell Script

Copy the code above and copy it into an editor like Powershell ISE or Visual Studio Code.
Change the following as preferred (in this example we will deploy Salesforce URL to our desktop).


Now save this PowerShell script to your local computer as a .ps1 file. I named it Create-Desktop-URL-Shortcuts.ps1.

Step 2: Deploy script with Microsoft Intune

Go to https://endpoint.microsoft.com and sign-in with a Global Administrator or Intune Administrator.

Go to Devices => Scripts. Then click on +Add and choose for Windows 10.


Give the Script a name. In this example it will be NDW – Add Custom URL shortcut to Desktop and click Next.


Choose the PowerShell script created and saved in Step 1. Leave the extra settings as default.


Assign it to All Devices or a group to those who need the deployment and click Next.


Review your settings and click Add. Your script will now be added.


Your script is now added and ready to deploy to the requested devices.

So this is how to deploy custom URL shortcuts with Microsoft Intune. Isn’t that difficult is it?

So this was the first post in my “Cases from the Field” series. Stay tuned for more…

Nicky De Westelinck

Nicky De Westelinck is a Modern Workplace Consultant for Wortell Belgium with several years of experience in Microsoft 365. His main focus is Microsoft EndPoint Manager and Microsoft 365 Administration. He is also a Microsoft Certified Trainer since 2021.

View all posts by Nicky De Westelinck →

6 thoughts on “How to deploy custom URL shortcuts with Microsoft Intune

  1. Any way to have this force use Internet Explorer? I have some legacy apps that only launch from IE.

  2. +My company has Android and Apple devices in Intune. I’ve been tasked with pushing a company website shortcut to all the Apple devices. I tried the script and it immediately says the uploaded file isn’t a valid script. Is there a wayto do this for iOs devices in Intune?

Leave a Reply

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