Forum Discussion
Creating desktop shortcuts
- Sep 08, 2021I 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/
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
https://call4cloud.nl/2021/01/public-desktop-icons-and-adminless-the-far-side-of-intune/
- Sep 09, 2021Hi, 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)
- AB21805Sep 08, 2021Bronze Contributor
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)
Is ther anyway to find out why this is failing:
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!
- AB21805Sep 08, 2021Bronze ContributorThank you! Ill take a look and let you know how I get on!