Aug 31 2021 06:25 AM
Aug 31 2021 06:25 AM
How to I create desktop shortcuts via intune? Which go to specific sites?
Aug 31 2021 09:22 AM
I've used Powershell scripts to do this in the past. I did a quick bing search and found someones notes on how to do this
Sep 01 2021 11:22 PM
You could take a look at what I did while creating a shortcut to a rdp file on a specific folder. You could skip the rdp part and just change the $targetpath = "c:\program files (x86)\rdp\remoteapp.rdp"
To the website you want
Soooo something like this
$null = $WshShell = New-Object -comObject WScript.Shell
$path = "C:\Users\Public\Desktop\call4cloud.url"
$targetpath = "https://www.call4cloud.nl"
$iconlocation = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
$iconfile = "IconFile=" + $iconlocation
$Shortcut = $WshShell.CreateShortcut($path)
$Shortcut.TargetPath = $targetpath
Add-Content $path "HotKey=0"
Add-Content $path "$iconfile"
Add-Content $path "IconIndex=0"
Sep 07 2021 02:13 PM
Sep 07 2021 10:05 PM - edited Sep 07 2021 10:27 PM
Thats odd... I will try to see what happens at my side ... can you post a screenshot of the powershell script settings ? (user/system / 64 bits etc)
UPDATE: The first run in a sandbox worked like expected... waiting for it to be deployed to my test device/testtenant
UPDATE: Also copy paste my script above into a ps1, uploading it to intune
And after syncing the device the shortcut popped up
Sep 08 2021 02:04 AM
So after doing this script manually it fails:
#Create a wscript.shell object
$ComObj = New-Object -ComObject WScript.Shell
#Use the createshortcut method and assign to a variable
$ShortCut = $ComObj.CreateShortcut("$Env:USERPROFILE\desktop\youtube.url")
#Path to URL
$ShortCut.TargetPath = "http://www.youtube.com"
But even though this works manually running it, it fails when deploying via intune!
I have using these settings:
The group I have assigned this script to are devices not users
Any idea why this isnt working for me?
Sep 08 2021 02:55 AM
Hi... the first script (my script :P) is working like expected... when I run it manually
But the second script i am noticing the variable :$Env:USERPROFILE\desktop\youtube.url
That means the script needs to be executed as the user... otherwise it will end up in the system desktop :)
WHen using the first script manually ... do you receive an error ?
*do you have edge installed inside the program files folder?
*Can you check out the public desktop... are there any icons on it? Maybe a gpo with conflicting settings?
Sep 08 2021 03:15 AM
Sep 08 2021 06:20 AM