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

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

1 Answer 1

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.