Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

12 thoughts on “Get and Export User Profile Properties using PowerShell in SharePoint 2013

  • April 10, 2019 at 6:28 AM

    Thanks for this. Another question How can I show empty value in double quotes? Currently it shows comma separated by no quotes.

    Reply
  • February 1, 2019 at 12:33 AM

    Hi, I am new to powershell – can you please advise how can I add an exclusion filter to this script? e.g. If I want to exclude results that have no employee numbers in their user profile.

    Reply
    • February 1, 2019 at 7:46 PM

      In Line#19, Just Replace: foreach ($Profile in $UserProfiles) with foreach ($Profile in $UserProfiles | Where {$_[“EmployeeNumber”] -ne $NULL}) – as a note, the EmployeeNumber field must be mapped to import from AD!

      Reply
  • October 25, 2018 at 4:32 PM

    I just tried to run this on my on-prem 2013 farm. The Total Number of Profiles found output as 1 1 1 1 1 1 1 1 1 1…

    It created the CSV file but didn’t populate it with any profile information. Any ideas?

    Reply
    • February 10, 2020 at 5:07 PM

      I have the same issue

      Reply
    • November 7, 2020 at 12:16 AM

      Same for me. Was there any solution

      Reply
      • August 9, 2021 at 11:32 PM

        In my case the code section counting the profiles didn’t work for me. I commented it out:

        #Get All User Profiles
        $UserProfiles = $UPM.GetEnumerator()
        # Write-host “Total Number of User Profiles found:”$UserProfiles.Count

        Reply
  • November 8, 2017 at 8:33 PM

    How to get list of “User Profiles Missing from Import”

    Reply
  • September 8, 2017 at 11:09 AM

    Should this work in SP2016? I have run the script and am getting a blank CSV

    Reply
  • May 19, 2016 at 7:30 PM

    if i want the output in a sharepoint list with 5 columns (firstname, lastname, workemail, jobtitle, workphone), where i need to make changes

    Reply
    • May 22, 2016 at 9:46 AM

      Replace the below lines between Line#: 23 to 27.
      $ProfileData | Add-Member -MemberType NoteProperty -name “Account” -value $Profile[“FirstName”]
      $ProfileData | Add-Member -MemberType NoteProperty -name “Display Name” -value $Profile[“LastName”]
      $ProfileData | Add-Member -MemberType NoteProperty -name “E-Mail” -value $Profile[“WorkEmail”]
      $ProfileData | Add-Member -MemberType NoteProperty -name “Manager” -value $Profile[“Title”]
      $ProfileData | Add-Member -MemberType NoteProperty -name “Department” -value $Profile[“Department”]

      Reply

Leave a Reply