SharePoint Guru – SharePoint 2010: Viewing, Sorting, and Filtering SharePoint User Profiles Using PowerShell

It's time for another July TechNet Guru winner!

Matthew Yarlett is our SharePoint TechNet Guru for July! See the TechNet Guru Contributions for July 2013.


Matthew Yarlett's avatar

About Matthew: I'm a solutions architect primarily focused on delivering business solutions built on top of the SharePoint platform. I love getting technical, but I'm equally interested in the business end of IT and deriving value from IT systems.


Here is the winning article:

SharePoint 2010: Viewing, Sorting, and Filtering SharePoint User Profiles Using PowerShell


Here are all the SharePoint winners for July:

Guru Award  SharePoint 2010 / 2013 Technical Guru - July 2013  

Gold Award Winner


Matthew Yarlett Viewing, sorting and filtering SharePoint User Profiles using PowerShell Jinchun Chen: "Many users would like to filter User Profiles based on some criterion. This article shows them a good example."
Ed Price: "Well formatted and broken up with the code and images. And as Jinchun mentioned, this is a very common scenario."

Silver Award Winner


Stefan Bauer Get "Modified" and "Modified By" information from a view in a list or library Ed Price: "It's a common request. Your solution is simple and straightforward. The comments are also revealing as to how useful this is. As Matthew says, "Handy bit of code." Great job!"

Bronze Award Winner


Rahul A Shinde SharePoint 2013: How to get Following and Followers of user using JSOM or JavaScript Jinchun Chen: "Cool. "
Ed Price: "Interesting topic, great code snippets, and as Gitanjali says in the comments, "Very useful""


We had twelve entries for this category in July, a fantastic show! Thanks go to Ashish Gupta, Julie Boudro, Mohammad Nizamuddin, Jesper Arnecke & Daniel Christian, who all just missed out on medals this month.    



And here's an excerpt from the article:



Using the collection of user profiles, we can then view, sort and filter user profiles rather easily. Here are some examples:

 List all the user profiles:

$pc = $upm.GetEnumerator();
$pc | FT DisplayName

List all the user profiles, including the account name. The account name is one the user profiles properties, in the Properties collection. User profile properties can be accessed directly from the UserProfile object by name, as userprofileobject["propertyname"]. We can leverage this in Format-Table by using a Hash Table (that contains an expression) to get the profile property we want.

First, by examining the UserProfile object, we can see it has a collection of properties:

We can use these properties in Format-Table by putting them in a Hash Table (which contains a Label for the value and an Expression that gets the value). There's more information about using Hash Tables with PowerShell on the TechNet site, and here's an example: Displaying Process Information in a Custom Table





Read the rest here:

 SharePoint 2010: Viewing, Sorting, and Filtering SharePoint User Profiles Using PowerShell


Thanks to Matthew Yarlett for your great contribution to the TechNet Guru contest! You can read about all the July winners here: TechNet Guru Awards - July 2013


Also, for the August Guru competition, see TechNet Guru Contributions - August 2013.


Are you a Wiki Ninja?

- User Ed


Comments (3)

  1. You're welcome Matthew!

    Matthew is one of only three TechNet Gurus to win gold medals three months in a row!

  2. Computers Today (part 1 of 6)…/computers-today.aspx


    CS SPOTLIGHT: Girls in computer programming… why it matters!!!…/cs-spotlight-girls-in-computer-programming-why-it-matters.aspx

    Computational Thinking – Videos & Papers by Jeannette Wing…/computational-thinking-videos-amp-papers-by-jeannette-wing.aspx

Skip to main content