Desktop files from Onedrive

How to remove Onedrive files from appearing on Desktop

I am Jaspreet Singh.
The solution is partially correct.
You do not need to follow the steps to move the location or to stop syncing the folder part.
Just click on onedrive icon in taskbar then on gear icon in top right hand side then on settings.
In settings popup click on backup tab and then click on Manage Backup
(upper right) This will show you three sections click on stop backup on desktop and confirm the choice.

This will bring back all the data for desktop on your system and will put it in a folder with a link to it on the desktop saying “where are my files” Click on that link then cut and paste the data back to the desktop.

** This unfortunately also stops the automated backup of your desktop so if you want to have desktop files on onedrive you will need to manually backup the files or keep them on a location that backs up to onedrive.