Export SharePoint Online Group Users to Excel using Powershell
Sometimes, we have a requirement to generate user reports from SharePoint groups or validate which user is added to which groups etc. If we do this activity manually, it may take forever (obviously based on the user added to group 😉). Classic example, recently in my project i got a requirement where i need to find all the users who are added to multiple SharePoint groups. Now i have 2500 users added to my SP Groups and it is difficult to check one by one. So i generated CSV/Excel for each group and added a vlookup in excel and got my report. Below is the Powershell script, which helps to generate CSV file based on group name. Note: All the input variables are mentioned in Green Color, Please update before executing this script. $aClient = [ System.Reflection.Assembly ]:: LoadWithPartialName( "Microsoft.SharePoint.Client" ) $aClientRuntime = [ System.Reflection.Assembly ]:: LoadWithPartialName( "Microsoft.SharePoint.Client.Runtime" ) Function Get-UserInfo