SharePoint - How to export SharePoint User Profile Information values in CSV using powershell

Copper Contributor

Hi All,


I'm new to SharePoint and I'm trying to automate the process of exporting all the user's information to a CSV file using Powershell. I've got some sample PowerShell script but it doesn't seem to work, assuming it's due to one of the below reasons.


1) Do I have to run PowerShell as admin?

2) Do I have to be an admin on the SharePoint site?


Any other ideas on how to achieve this?


Thanks in advance.


Best Regards,



5 Replies
Which SharePoint version? Online?
Which PowerShell version you are using?

@Matti Paukkonen 

Hi Matti,


Yes, I'm using SharePoint online office 365.

Powershell version 5.1

Hi @Abhi04 ,


Yes, You need to have SharePoint Admin rights

and establish the connection to SharePoint Online using Admin Credentials ,to perform Tasks like Exporting SharePoint User Profile information. Also do Check the cmdlets you used and its argument list.


and it is always recommended to use PowerShell as Administrator and use 

Powershell ISE (Integrated Scripting Environment) for Automation.


Hi @gk_vasudev,


Thank you for your response.

Quick question: I'm the owner of the site but not an admin. I can see all the user information on the SharePoint online site. With me having owner rights, is it not possible to export the user profile information in Powershell?

No, its not possible. powershell only allows admins to export profile information.