Forum Discussion

charlie4872's avatar
charlie4872
Brass Contributor
May 29, 2020

Giving manager access to previous employee OneDrive Data.

I have a situation where we are shutting down an office location where users are using OneDrive. I have a list of users from that location and the users' manager who needs to take over the users data. Is there any way to automate this via PowerShell for example, instead of going to each users profile and manually changing the site collection owner? Any help is much appreciated!

 

Thanks

1 Reply

  • ShivajiDhole's avatar
    ShivajiDhole
    Brass Contributor

    Hi charlie4872 ,

     

    Its pretty much possible. You have to read One Drive Site Collection of Each user and Define Secondary Owner as his Manager.

    TO get Manager of User is additional activity of of links  given as starting point.

     

     

    https://byteben.com/bb/modify-onedrive-site-admins-with-powershell/

    Using Pnp Powershell :

    https://vladtalkstech.com/2019/04/find-a-users-onedrive-for-business-site-url-with-powershell.html

     

    Let me know if you have any questions further.

     

Resources