Take the 2-minute tour ×
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 https://intranet.mysite.com -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 3 down vote accepted
Get-SPUser -web https://intranet.mysite.com | 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.