SOLVED

Creating desktop shortcuts

Bronze Contributor

Hi all, 

 

How to I create desktop shortcuts via intune? Which go to specific sites? 

 

Any ideas? 

24 Replies

Hi @Rudy_Ooms_MVP 

 

I have changed the interactive permission to modify and it worked by running manually on the device which didnt work with this script before! Can I add something in the script to enable this 

best response confirmed by AB21805 (Bronze Contributor)
Solution
I guess so.. you can take a look at this blog of mine... it describes how I gave everyone full control to the public desktop... you can use it to change the interactive permissions i guess

https://call4cloud.nl/2021/01/public-desktop-icons-and-adminless-the-far-side-of-intune/
Thank you! Ill take a look and let you know how I get on!

Hi @Rudy_Ooms_MVP 

 

So now the icon works manually after deploying the script which I got from your blog which allows permission to the public desktop! but I am still unable to deploy the destopicon / link from intune  !

 

The script is the same i use manually (which you have posted in this thread) : 

 

$null = $WshShell = New-Object -comObject WScript.Shell

$path = "C:\Users\Public\Desktop\youtube.url"

$targetpath = "https://www.youtube.com"

$iconlocation = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"

$iconfile = "IconFile=" + $iconlocation

$Shortcut = $WshShell.CreateShortcut($path)

$Shortcut.TargetPath = $targetpath

$Shortcut.Save()

Add-Content $path "HotKey=0"

Add-Content $path "$iconfile"

Add-Content $path "IconIndex=0"

 

The script settings on intune: (assignment group are devices)

 

Screenshot 2021-09-08 at 6.17.06 PM.png

 

Is ther anyway to find out why this is failing: 

Screenshot 2021-09-08 at 6.16.25 PM.png

 

Or is there another way around this maybe deploying the actual .ps1 to a folder using intune and then get a script to run it? is this possible as running it from the device actually works!

Hi, could you check if the "system" account has permissions on the public desktop folder? As the other account was also missing? You could try it out yourself by downloading psexec and launch psexec -i -s powershell.exe en trying to execute the ps1 again line by line... (the intune mgt extension powershell scripts are run in system context if you don't configured to run under the user context)