Unlink OneDrive and stop syncing

%3CLINGO-SUB%20id%3D%22lingo-sub-1629385%22%20slang%3D%22en-US%22%3EUnlink%20OneDrive%20and%20stop%20syncing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1629385%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3EWe%20have%20about%20200%20computeres%20where%20many%20of%20the%20users%20are%20syncing%20the%20sharepoint%20library%20down%20to%20the%20local%20PC.%3C%2FP%3E%3CP%3ENow%20we%20need%20to%20move%20some%20data%20accross%20the%20sites%2C%20to%20do%20that%20will%20we%20be%20sure%20to%20remove%2Funlink%20the%20onedrive%20from%20users%20PC%20so%20they%20do%20not%20sync%20anymore.%3C%2FP%3E%3CP%3EThe%20steps%20should%20be%20like%20this%3A%3C%2FP%3E%3CP%3E1.%20Unlick%20the%20OneDrive%3C%2FP%3E%3CP%3E2.%20Remove%2FDelete%20all%20local%20files%20on%20PC%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20we%20have%20moved%20data%20then%20the%20user%20need%20to%20use%20OneDrive%20again.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20we%20do%20this%20from%20script%2Flogon%20or%20GPO.%3C%2FP%3E%3CP%3EPowershell%20or%20cmd.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1629385%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOneDrive%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eonedrive%20sync%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1629489%22%20slang%3D%22en-US%22%3ERe%3A%20Unlink%20OneDrive%20and%20stop%20syncing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1629489%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F780084%22%20target%3D%22_blank%22%3E%40BR1984%3C%2FA%3E%26nbsp%3BUnfortuneately%20I%20don't%20think%20this%20is%20possible.%20The%20closest%20thing%20you%20might%20be%20able%20to%20do%20I%20remember%20seeing%20a%20GPO%20that%20would%20force%20SharePoint%20sync's%20to%20only%20use%20OnDemand%20and%20not%20sync%20locally.%20That%20might%20be%20able%20to%20be%20used%20to%20have%20the%20library%20be%20OnDemand%20so%20when%20it's%20removed%20no%20local%20files%20exist.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOneDrive%20really%20needs%20to%20%22Delete%20local%20files%22%20when%20someone%20loses%20access%20to%20a%20library.%20Other%20products%20have%20this%20option%20and%20is%20an%20option%2C%20but%20just%20being%20able%20to%20set%20one%20way%20globally%20or%20the%20other%20for%20now%20would%20be%20ideal%20since%20adding%20in%20an%20option%20would%20be%20a%20much%20larger%20ask.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F181%22%20target%3D%22_blank%22%3E%40Stephen%20Rice%3C%2FA%3E%26nbsp%3B%20got%20anything%20to%20add%20to%20this%20or%20ideas%3F%20Not%20sure%20if%20there%20is%20a%20user%20voice%20for%20being%20able%20to%20delete%20files%20off%20user%20machines%20when%20libraries%20get%20removed%20%2F%20people%20lose%20access%20to%20things%20but%20it's%20def.%20something%20sorely%20needed%20in%20the%20product%20as%20all%20the%20artifacts%20that%20get%20left%20behind%20when%20even%20manually%20unsyncing%20leaves%20behind%20can%20cause%20issues%20IMO%20with%20data%20staying%20consistent%20in%20the%20org.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi

We have about 200 computeres where many of the users are syncing the sharepoint library down to the local PC.

Now we need to move some data accross the sites, to do that will we be sure to remove/unlink the onedrive from users PC so they do not sync anymore.

The steps should be like this:

1. Unlick the OneDrive

2. Remove/Delete all local files on PC

 

After we have moved data then the user need to use OneDrive again.

 

How can we do this from script/logon or GPO.

Powershell or cmd.

 

Thanks

1 Reply
Highlighted

@BR1984 Unfortuneately I don't think this is possible. The closest thing you might be able to do I remember seeing a GPO that would force SharePoint sync's to only use OnDemand and not sync locally. That might be able to be used to have the library be OnDemand so when it's removed no local files exist. 

 

OneDrive really needs to "Delete local files" when someone loses access to a library. Other products have this option and is an option, but just being able to set one way globally or the other for now would be ideal since adding in an option would be a much larger ask. @Stephen Rice  got anything to add to this or ideas? Not sure if there is a user voice for being able to delete files off user machines when libraries get removed / people lose access to things but it's def. something sorely needed in the product as all the artifacts that get left behind when even manually unsyncing leaves behind can cause issues IMO with data staying consistent in the org.