Need scipt to search a group of memebers for a attribute "employeeID"

Posted on 2013-10-15
Medium Priority
Last Modified: 2013-10-15
So I have 600 users that I need to get there employeeID for. I figured I could put the users in a group and run a script against that group to output their employeeID's. Which is an attribute under ADSIedit.

Anyone have a script for this?
Question by:rdefino
  • 3
LVL 35

Expert Comment

by:Joseph Daly
ID: 39574551
Theres alot of different ways of doing this. One using DS series of tools

dsquery user -samid * -limit 0 | dsget user -empid -samid
LVL 35

Expert Comment

by:Joseph Daly
ID: 39574561
And in powershell using the quest cmdlets.

get-qaduser -sizelimit 0 -includedproperties employeeid | select-object samaccountname, employeeid

Author Comment

ID: 39574564
How can I search all members of a group. I have 600 users to search?

LVL 35

Accepted Solution

Joseph Daly earned 2000 total points
ID: 39574703
Try this.

Get-QADGroupMember GROUPNAME* | foreach {get-qaduser $_.samaccountname -includedproperties employeeid | select-object samaccountname, employeeid}

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
A bad practice commonly found during an account life cycle is to set its password to an initial, insecure password. The Password Reset Tool was developed to make the password reset process easier and more secure.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

624 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