Forum Discussion
Global Admin Showing up with Access to All Users OneDrive for Business
I removed the secondary owner in the central admin center but it did not remove it - is this something that takes 24 hours to perform this task?
I got a powershell script to remove my permissions from all OneDrive users. Thanks.
- SaschaBuehlerSep 09, 2019Copper Contributorcould you share this script, please
- Paul McClenaghanMay 21, 2018Copper ContributorCould you please advise where you got the script?
- zstjmbMay 21, 2018Brass Contributor
Sure, I got it directly from Microsoft - here is the script:
Powershell command to attach to someone's OneDrive as a secondary Administrator to copy files:
Open SharePoint Online Management Shell - run as Administrator
Copy and run this script below replacing the user's name and using underscore between user first name and last name and yourcompany.com
Set-SPOUser -Site https://amtrak-my.sharepoint.com/personal/FirstName_LastName_amtrak_com -LoginName Your.Name@yourcompany.com -IsSiteCollectionAdmin $false
Then hit ENTER to run.
NOTES:
$true adds you as an Admin to their OneDrive
$false removes you as Admin to their OneDrive
- zstjmbMay 21, 2018Brass Contributor
The -my/personal/FName_LName_tenant_com -YourLoginName@yourcompanyname.com in case that is not clear since the text is underlined as a url.