Export All Site Users from SharePoint On-Premises Using PowerShell

Introduction

In this blog, you will learn how to export all site users from SharePoint on-premises to CSV files using PowerShell.

Steps Involved.

Perform the following steps to run the PowerShell script to export all site users from SharePoint on-premises to CSV files.

  1. Unzip GetAllSiteUsers folder.
  2. Open the InputSites.csv file and update the SharePoint site URLs.
  3. Save InputSites.csv file.
  4. Open PowerShell and navigate to the GetAllSiteUsers folder.
  5. Run the following command. A credentials pop-up will open, enter the credentials and click OK.
.\ GetAllSiteUsers.ps1

Result

UserCount.csv and UserDetails.csv files are created in the same directory.

UserCount.csv

User Count-

UserDetails.csv

User Details-

Summary

This blog describes how to export all site users from SharePoint on-premises to CSV file using PowerShell.