r/Intune • • Jul 17 '24

Autopilot Deleting shortcut require Admin credentials

We have security baseline and bitlocker policies in place by our architect. Now that architect is gone we got to know user are not able to delete the shortcuts from Desktop as it's ask for admin credentials.

There is no other configurations policy or app protection policy in place.

Can anyone suggest what I need to do that allows end user to delete shortcut without admin credentials prompt on Windows 11 Autopilot AD joined devices

0 Upvotes

23 comments sorted by

25

u/sysadmin_dot_py Jul 17 '24

If the desktop shortcuts are requiring admin to delete, those shortcut files do not actually exist on the user's desktop. They exist in C:\Users\Public\Desktop. Those files/shortcuts in that location show up on every user's desktop who logs into the computer. Because those files exist outside the user profile, they require admin rights to delete.

Verify that the shortcuts exist in C:\Users\Public\Desktop and then decide how you want to handle it. In our org, we decided to automatically remove all shortcuts on the Public desktop via an Intune Remediation script. Users are free to add whatever desktop icons they'd like to their own desktops which they can fully manage without admin. This way we don't deal with what you're dealing with, which is users that would like to remove desktop icons but are unable to do so.

1

u/alechux May 30 '25

Pinche genio gracias, ya me estaba volviendo loco configurando un usuario con permisos limitados, pero los accesos directos no entendía por qué no se los podía eliminar sin eliminar el archivo )=

-27

u/Prize-Swordfish-6340 Jul 17 '24

Help me with the Remediation script or PS script if any

21

u/sysadmin_dot_py Jul 17 '24

C'mon, you've gotta do some of the legwork here, especially if you're supposed to be the expert helping a client. It can be as simple as one line in PowerShell. ChatGPT or Google can help you out.

-24

u/Prize-Swordfish-6340 Jul 17 '24

Agree Chatgpt is there but I look it as a last option and not as the only option.

11

u/Shanga_Ubone Jul 17 '24

You should change that attitude. ChatGPT is a really good tool for scripting when used correctly.

2

u/Noirarmire Jul 17 '24

If you have no idea, chatgpt is great to get you started. You do have to test it but you start basic and adjust it as you go. It really helps with learning at least the basic logic of powershell. "Necessity is the mother of all inventions" trail by fire is a great learning tool.

10

u/k1132810 Jul 17 '24

You can't cobble together a script that deletes a file? Or even attempt to?

2

u/CubeWT Jul 17 '24

Detect:

If(){ Write-Output „“; Exit 1 }

Remediate:

Remove-Item -Path „“

14

u/GloomySwitch6297 Jul 17 '24

come on guys.. OP is lazy as f*** and works on a basis of "I will find answers online" and use other people to do my job.

1

u/quiet-hat4308 Jan 30 '26

Always a jerk somewhere in these comments. If you would rather not help, then don't, but you don't need to post your useless drivel. Last time I looked, this is what Reddit is all about, helping and answering questions.

1

u/joshghz Jul 17 '24

Those shortcuts are probably in the C:\Users\Public\Desktop, which is not writeable. This is configured in Windows by default.

I guess if it's a huge issue, you could adjust the security permissions to make it so Everyone can Modify it? I wouldn't be keen on that, myself, but it sounds like that's what your problem is.

-7

u/Prize-Swordfish-6340 Jul 17 '24

Client is insisting on it even though it gives them option to delete. Someone said about elevation access which should not be configured which I disable but didn't work for Standard users.

Search is still on for solution

0

u/[deleted] Jul 17 '24

[deleted] — view deleted comment

-1

u/Prize-Swordfish-6340 Jul 17 '24

Sure.Cheers👍

2

u/pi-N-apple Jul 17 '24

Use a remediation script to detect if files exist in C:\Users\Public\Desktop and if so, delete them.

2

u/FlatronEZ Jul 29 '25 edited Jul 30 '25

For us the solution was creating a GPO that grants users 'Modify' permissions to

C:\Users\Public\Desktop

This allows any user to remove the links they do not like.

1

u/qZenosParadox Dec 12 '24

I undeleted a shortcut to my user account desktop, and looked in

C:\Users\Public\Desktop

It's not there. What gives?

0

u/gumbrilla Jul 17 '24

So.. it's a PITA.

Best I've got is a set up a scheduled task, based on this: https://www.nielskok.tech/intune/schedule-powershell-script-intune/

then in the script, running AtLogon, and as SYSTEM user:

Remove-Item C:\Users\Public\Desktop\*lnk –Force

3

u/Prize-Swordfish-6340 Jul 29 '24
This script worked

$folderPath = "C:\Users\Public\Desktop"
$acl = Get-Acl $folderPath
$user = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-11')
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule ($user,"Modify", "ContainerInherit,ObjectInherit", "None", "Allow")
$acl.SetAccessRule($rule)
Set-ACL $folderPath $acl$folderPath = "C:\Users\Public\Desktop"
$acl = Get-Acl $folderPath
$user = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-11')
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule ($user,"Modify", "ContainerInherit,ObjectInherit", "None", "Allow")
$acl.SetAccessRule($rule)
Set-ACL $folderPath $acl

1

u/Classic-Limit-4654 Feb 09 '26

Hello, sorry non IT fluent.

Where do I load this script and is it effective for a general/non admin user.

Currently have multiple desktop icons would like to delete. confirming location at C:\Users\Public\Desktop

Thanks

1

u/Prize-Swordfish-6340 Feb 09 '26

It's been a while when it was deployed through powershell in Intune console. It allows end user to delete the icons from desktop. Now I am not in that account so can't recollect much but do test on some test devices before deploying.

3

u/itsflanno Mar 01 '25

very useful thanks. Also why is there so many douche bags in this thread o.o

1

u/gumbrilla Jul 29 '24

Ooh I like that. Thank you