Forum Discussion
Bhavpreet Bains
Oct 09, 2018Iron Contributor
onedrive list of admin
Hello,
We have a user who was accidentally added as site collection admin to various OneDrive accounts. Is it possible to pull a list of all site collection admin for all OneDrive accounts?
I've tried using the following cmdlet on one of the site before creating the full script.
get-spouser -Site "<site url>" | select DisplayName, LoginName, UserType, IsSiteAdmin
The above returns all site users with isSiteAdmin as false unless I grant my admin account as site collection admin which is not ideal solution.
Running Get-Sposite returns only primary site collection admin.
Which should be the best way to pull list of all site collection admins?
Thank you.
B
- Bhavpreet BainsIron ContributorHello Juan,
I've tried the following cmdlet but it doesn't return isSiteAdmin true.
get-spouser -Site "<site url>" | select DisplayName, LoginName, UserType, IsSiteAdmin- I’m playing with a script but so far all I get is all the onedrive sites and the original corresponding owner, even if I added someone else as owner as well.
IsSiteAdmin doesn’t return any value