Forum Discussion

mateiacd's avatar
mateiacd
Copper Contributor
Feb 02, 2022

How to use C#/ Powershell to prevent a OneDrive subfolder from being synced locally on my laptop

Hi,

 
The OneDrive GUI client allows the user to prevent/uncheck a certain OneDrive subfolder from being synced locally on my laptop.
 
I am interested to use C# or Powershell for this purpose, is it possible ?
https://support.microsoft.com/en-us/office/choose-which-onedrive-folders-to-sync-to-your-computer-98b8b011-8b94-419b-aa95-a14ff2415e85
 
Please see the https://blogger.googleusercontent.com/img/a/AVvXsEiVqNB1pXtTPV8TooOb94r_zQMlbsP7bEIJyvD1lvjrbVZeuFIdxTiB3gvlhtVzia-pE689gRPOX1WFdFr9jS6A1aD-KHzIqO6uFvKMuXENG_BqrXn4mxL3OeD8jhhRcZmgCMjXHPuF-89i8H_7ZVQp2Lz04NCLGwYGqpHrKb17qmIybiFyCeMMTlUT_A=s1640. I would like the 'BackForTransfer' folder to exist only in OneDrive and not be synced locally on my laptop.
 
Another guy is asking a similar question here.
https://docs.microsoft.com/en-us/answers/questions/615062/enumerate-sync-folder-setting-on-onedrive-by-scrip.html
 

Thank you!

No RepliesBe the first to reply

Resources