Forum Discussion

cprothero's avatar
cprothero
Iron Contributor
Feb 08, 2018

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 UNSHARE anything that's been shared. Or just set everything to Private if that's easier. 

 

Is this possible? With PnP, or maybe a POST to Graph, or any other way?

 

Thanks.