How to add a secondary administrator to a user's ODFB

This script allows to add a secondary administrator to a user's OneDrive For Business (ODFB) by using standard cmdlet Set-SPOUser. The script defines a function that receives the parameters required (ODFB Host Url, user's ODFB relative path, secondary administrator to be added)

 
 
 
 
 
5 Star
(1)
239 times
Add to favorites
Office 365
4/13/2019
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Can we use wild cards to apply this to all users?
    2 Posts | Last post July 14, 2019
    • I have a need to take ownership of 1000 or so users.  For a OneDrive Migrations.  Is there a way to bulk add and then remove myself as co-owner to these SPO personal document repositories? 
    • Yes,
      You could this script as a foundation for a script where you read the ODFB sites you want to make the ownership from a CSV file for instance
  • $sSPODFBRelativePath: ODFB Relative Path
    2 Posts | Last post July 14, 2019
    • Hi,
      
      Im a bit unsure what $sSPODFBRelativePath: ODFB Relative Path is reffering to. Are we supposed to type the path to onedrive
    • Hi,
      It refers to the path you need to add after https://<O365Domain>-my.sharepoint.com/personal/" that path identifies the specific ODFF user that has the form <O365User>_<Office365Domain>_onmicrosoft_com
  • sSPODFBRelativePath
    2 Posts | Last post April 13, 2019
    • Hi Juan
      
      Can you please tell me what would be entered for "sSPODFBRelativePath"?
      Is this the tenant one drive URL or the User onedrive?
    • That variable stores the ODFB site relative url for a user ODFB site
  • sSPOODFBHostUrl: SharePoint ODFB Host URL
    3 Posts | Last post April 13, 2019
    • also for "sSPOODFBHostUrl: SharePoint ODFB Host URL" is this the tenant sharepoint URL?
    • No, this variable stores the URL of the ODFB site where you want to add a secondary administator
    • Sorry, I didn't provide the right answer….this variable stores the Host URL for all the ODFB sites in your tenant
  • How to obtain list of secondary owners
    1 Posts | Last post January 19, 2018
    • Thank you very much for the previous script.
      I would like to know how the script can be reversed, so that instead of creating secondary owners for Onedrive for Business, it would be able to give me a list of accounts in my organization sharepoint along with the primary owners and secondary owners (if any). 
      
      Thank you very much.