Aug 31 2021 06:25 AM
Hi all,
How to I create desktop shortcuts via intune? Which go to specific sites?
Any ideas?
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
Remote App: The Last Whish - Call4Cloud
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
$Shortcut.Save()
Add-Content $path "HotKey=0"
Add-Content $path "$iconfile"
Add-Content $path "IconIndex=0"
Sep 05 2021 10:34 AM
@Rudy_Ooms_MVP Thank you! I will give this a try! and close once I give it ago!
Sep 06 2021 06:33 AM
Here is my script but it fails! any ideas? I have put the url in for a sharepoint location (Target path)
Sep 06 2021 09:39 AM
Sep 07 2021 02:58 AM
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
Hi
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"
$ShortCut.Save()
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?
Please help!
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 03:17 AM
Sep 08 2021 03:52 AM
I have copied line for line seems like a permissions thing! I am logged in as a admin aswel! Do you know how I can fix this?
Sep 08 2021 05:05 AM
Im wondering if its better to do it the Win32 way ? I just done understand this?
md "c:\program files (x86)\rdp"
copy .\rdp.ico "c:\program files (x86)\rdp\rdp.ico"
copy .\remoteapp.rdp "c:\program files (x86)\rdp\remoteapp.rdp"
Sep 08 2021 06:20 AM
Sep 08 2021 06:26 AM
Do you mean this? If something needs changing can we do this via intune too for this to work?