Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to search for user list based on an attribute

Posted on 2014-07-24
1
Medium Priority
?
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

670 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