Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to search for user list based on an attribute

Posted on 2014-07-24
1
Medium Priority
?
272 Views
Last Modified: 2014-07-24
I need to pull a list of all user in AD and show the "exsentionattribute4" so I can sorted it in excel.

How can this be done?
0
Comment
Question by:rdefino
1 Comment
 
LVL 4

Accepted Solution

by:
SEHC earned 1000 total points
ID: 40216851
Run this command in AD powershell.  Don't for get to change the OU=,DC=,DC=com to your domain.


get-aduser -searchbase “OU=FOLDER IF YOU WANT TO SEARCH BY THAT,DC=YOURDOMAIN,DC=com”  -Filter * -properties extensionAttribute4, displayName |  ? { $_.sAMAccountName } | select sAMAccountName, displayName, extensionAttribute4 | export-csv "C:\extensionAttribute4.csv"
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question