locked
One drive RRS feed

  • Question

  • Hi ,

    I have a major issue with personal Onedrive.

    I have member named Jaco who is having a local admin access to SharePoint. He was added in all users onedrive personal site. We spoke to Jaco about his account to be deleted from the site, But was denied stating he needs access to the sites since he is the admin.

    We tried running the below script

    foreach ($login in ((get-spouser -Site  https://unit4-my.sharepoint.com).LoginName)) {if($Login.Contains('@')) { $login=$login.Replace('@','_'); $login=$login.Replace('.','_'); $login=$login.Replace('.','_'); $login="https://unit4-my.sharepoint.com/personal/"+$login; Set-SPOUser -Site $login -LoginName  jaco.Konijnenburg@unit4.com -IsSiteCollectionAdmin $false}  }

    Which worked only 10%, meaning the script deleted all of the users who's names start with Alphabet "A" and half of "B" and then later nothing happened and threw an error.

    Hence we tried modifying the script and had no luck and again it threw an error.

    So could you assist us for a valid script where "Jaco" can be deleted from all users, There are about close to 12000+ users where his name is added in their perspective ODFB owners list.

    Regards,

    Raji


    Raji

    Thursday, May 19, 2016 8:33 AM

Answers

  • I'd try them over here.

    https://community.office365.com/en-us/f/154

     

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    • Proposed as answer by Mike Laughlin Monday, May 23, 2016 12:26 PM
    • Marked as answer by Just Karl Tuesday, May 31, 2016 3:06 PM
    Saturday, May 21, 2016 7:01 PM