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

Copper Contributor

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 ?
Please see the attached imageI 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.

Thank you!

0 Replies