$AdminCenterURL = "" #Connect to SharePoint Online Connect-SPOService -url $AdminCenterURL -Credential (Get-Credential) #Get Site owners of all site collections Get-SPOSite -limit ALL | Select URL, Owner| Export-Csv d:\sites.txt get-sposite | %{ $user = get-spouser -site $_ -loginName "emailid1@rbeerla.onmicrosoft.com"; if($user.Groups.Count -gt 0){write-output $_.url ":" $user.Groups} }
Hi! I'm Ramesh Beerla, working as a Team Lead and passionate about developing automated solutions to customers. In this blog I will post some important articles which will be useful for fellow developers