Forum Discussion
cprothero
Feb 08, 2018Iron Contributor
Can I unshare files in OneDrive with Powershell
I am looking through the cmdlets available in PnP-PowerShell and nothing is jumping out at me. What I want to do is loop through a given user's OneDrive - which I think I'm okay with - and then UNSHA...
cprothero
Feb 09, 2018Iron Contributor
Thanks for the reply - this is good to know, though it doesn't really apply to my situation as I need to be able to script it and turn off the sharing even to internal users.
I did run through your directions, just to see what was possible and it can be done in our tenant which E3, in case that helps others.
Pablo R. Ortiz
Feb 09, 2018Iron Contributor
You can try Set-SPOSite –SharingCapability with the user's OneDrive site URL, like https://tenant-my.sharepoint.com/personal/user_name_tenant_onmicrosoft_com
https://blogs.office.com/en-us/2015/09/30/extending-it-and-developer-options-for-odb/
https://blogs.office.com/en-us/2015/09/30/extending-it-and-developer-options-for-odb/