SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Having an SharePoint 2010 installation I try to filter the return result of Get-SPUser but I don't see any possible ways to get a single user or filtered users back.

Get-SPUser -Web -Limit '30'

Is it possible to use another Get-User method to return only those SPUsers who match search criterion, such as AD\an*

share|improve this question
up vote 4 down vote accepted
Get-SPUser -web | Where-Object {$_.UserLogin -like "*AD\an*"}

For more info on Where-Object: Using the Where-Object Cmdlet

share|improve this answer
Great! It even works with -Limit ALL – Benny Skogberg Apr 25 '12 at 9:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.