petben Posted May 30, 2023 Posted May 30, 2023 I need to periodically empty the OneDrive folders of 100 x Exams AD accounts. I also need to then empty the accounts OneDrive Recycle Bin. I already have manager permissions on the exam accounts folders and I know their personal URL's. I feel I need a mix of Remove-PnPFolder and then Clear-PnPRecycleBinItem. Has anyone got a working script?
Steve21 Posted May 30, 2023 Posted May 30, 2023 Used this one before: https://www.sharepointdiary.com/2019/04/empty-recycle-bin-onedrive-for-business-powershell.html 2nd bit regarding the loop Steve
petben Posted June 19, 2023 Author Posted June 19, 2023 I have the PowerShell working for me, but as far as I can see the user who will be running the script (an exams staff) will need 'SharePoint Admin' rights to Connect-SPOService. This is not an option... Any ideas?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now