To prevent users from storing files on the desktop while allowing shortcuts, use File Server Resource Manager (FSRM) to enforce file screening. First, install FSRM via Server Manager → Add Roles and Features if it’s not already installed. Then, open FSRM (fsrm.msc) → File Screening Management → File Screens, and create a new file screen for the desktop path (C:\Users%USERNAME%\Desktop or a redirected folder). Define a custom file group that blocks all file types (*.exe, *.txt, *.jpg, *.docx, etc.) except for .lnk files, ensuring that only shortcuts can be saved. Additionally, Folder Redirection via Group Policy can be used to relocate the desktop to a controlled network share, or PowerShell scripts can periodically scan and remove unauthorized files.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin