The “Add Shortcut to OneDrive” is a handy new feature in SharePoint Online to add any Library, Folder, or File shortcuts to a user’s OneDrive, so that you can visit them later.
How does the “Add Shortcut to OneDrive” Feature work?
The “Add shortcut to OneDrive” feature is a great new way to keep track of all the frequent libraries, folders, and documents you use regularly. Upon clicking the link, it creates a shortcut link in your OneDrive for Business under the “My files” view so that you can use OneDrive for Business to assemble links for SharePoint Online.
How to remove “Add shortcut to OneDrive”?
Problem: When users add SharePoint libraries as shortcuts, the OneDrive client on the user’s machine will attempt to sync everything (including all the files/folders in those shortcut libraries), and when the total size of the synced libraries exceeds their storage space, this immediately fills out the user’s disk space! While “Files on-Demand” settings can mitigate this issue, that’s not the case with most users!
So, Here is the PowerShell script to disable add shortcut to OneDrive. Once you run this PowerShell Shell cmdlet, the Add shortcut to OneDrive option is removed from SharePoint Online document libraries. However, existing shortcuts remain in place on OneDrive.
Connect-SPOService "https://crescent-admin.sharepoint.com" Set-SPOTenant -DisableAddShortCutsToOneDrive $True
It took about 15 minutes to propagate on all sites in my tenant, and the “Add shortcut to OneDrive” is totally removed on all sites. Please note, this PowerShell disables the “Add Shortcut to OneDrive” from all sites in the tenant (Not on specific sites). To turn ON add a shortcut to OneDrive back, use:
Set-SPOTenant -DisableAddShortCutsToOneDrive $False
Here is the script in action: Add Shortcut to OneDrive buttons removed!