Avatar of lianne143
lianne143
Flag for United States of America asked on

How to get the values of users attribute on an excel file.

Hi

We have 200 staff and if I go to the active directory – User Properties-Attribute Editor
There is an Attribute called: employeeNumber .

I would like to import all the 200 users employeeNumber attributes to a CSV or excel with one colum having the names and another Colum having the attribute of employeeNumber.

Please post me the exact syntax that I need to run or let me know if there is any utility that I can tun to get this value.

Thanks, and any help much appreciated.
PowershellActive Directory

Avatar of undefined
Last Comment
lianne143

8/22/2022 - Mon
Sajid Shaik M

go with powershell

Get-ADUser -Filter * -Properties * | Select-Object name, lastlogondate, employeeNumber,
 department | export-csv -path c:\temp\userexport.csv

Open in new window


please check the folloing link for more options and step by step

https://networkproguide.com/powershell-export-active-directory-users-to-csv/ 

all the best
ASKER CERTIFIED SOLUTION
oBdA

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Peter Chan

lianne143

ASKER
Apologies was not able to submit feedback  earlier!
Thanks for your help
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy