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

%3CLINGO-SUB%20id%3D%22lingo-sub-1521369%22%20slang%3D%22en-US%22%3ESharePoint%20-%20How%20to%20export%20SharePoint%20User%20Profile%20Information%20values%20in%20CSV%20using%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1521369%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20new%20to%20SharePoint%20and%20I'm%20trying%20to%20automate%20the%20process%20of%20exporting%20all%20the%20user's%20information%20to%20a%20CSV%20file%20using%20Powershell.%20I've%20got%20some%20sample%20PowerShell%20script%20but%20it%20doesn't%20seem%20to%20work%2C%20assuming%20it's%20due%20to%20one%20of%20the%20below%20reasons.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20Do%20I%20have%20to%20run%20PowerShell%20as%20admin%3F%3C%2FP%3E%3CP%3E2)%20Do%20I%20have%20to%20be%20an%20admin%20on%20the%20SharePoint%20site%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20other%20ideas%20on%20how%20to%20achieve%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20Regards%2C%3C%2FP%3E%3CP%3EAbhi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1521369%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPower%20shell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUsers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1522607%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20-%20How%20to%20export%20SharePoint%20User%20Profile%20Information%20values%20in%20CSV%20using%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1522607%22%20slang%3D%22en-US%22%3EWhich%20SharePoint%20version%3F%20Online%3F%3CBR%20%2F%3EWhich%20PowerShell%20version%20you%20are%20using%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1523507%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20-%20How%20to%20export%20SharePoint%20User%20Profile%20Information%20values%20in%20CSV%20using%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1523507%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5628%22%20target%3D%22_blank%22%3E%40Matti%20Paukkonen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Matti%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20I'm%20using%20SharePoint%20online%20office%20365.%3C%2FP%3E%3CP%3EPowershell%20version%205.1%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1525919%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20-%20How%20to%20export%20SharePoint%20User%20Profile%20Information%20values%20in%20CSV%20using%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1525919%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F553534%22%20target%3D%22_blank%22%3E%40Abhi04%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20You%20need%20to%20have%20SharePoint%20Admin%20rights%3C%2FP%3E%3CP%3Eand%20establish%20the%20connection%20to%20SharePoint%20Online%20using%20Admin%20Credentials%20%2Cto%20perform%20Tasks%20like%20Exporting%20SharePoint%20User%20Profile%20information.%20Also%20do%20Check%20the%20cmdlets%20you%20used%20and%20its%20argument%20list.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20it%20is%20always%20recommended%20to%20use%20PowerShell%20as%20Administrator%20and%20use%26nbsp%3B%3C%2FP%3E%3CP%3EPowershell%20ISE%20(Integrated%20Scripting%20Environment)%20for%20Automation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1526499%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20-%20How%20to%20export%20SharePoint%20User%20Profile%20Information%20values%20in%20CSV%20using%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1526499%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F726607%22%20target%3D%22_blank%22%3E%40gk_vasudev%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20response.%3C%2FP%3E%3CP%3EQuick%20question%3A%20I'm%20the%20owner%20of%20the%20site%20but%20not%20an%20admin.%20I%20can%20see%20all%20the%20user%20information%20on%20the%20SharePoint%20online%20site.%20With%20me%20having%20owner%20rights%2C%20is%20it%20not%20possible%20to%20export%20the%20user%20profile%20information%20in%20Powershell%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1528583%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20-%20How%20to%20export%20SharePoint%20User%20Profile%20Information%20values%20in%20CSV%20using%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1528583%22%20slang%3D%22en-US%22%3ENo%2C%20its%20not%20possible.%20powershell%20only%20allows%20admins%20to%20export%20profile%20information.%3C%2FLINGO-BODY%3E
Highlighted
Occasional 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,

Abhi

 

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

@Matti Paukkonen 

Hi Matti,

 

Yes, I'm using SharePoint online office 365.

Powershell version 5.1

Highlighted

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.

 

Highlighted

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?

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