Start Free Trial
Powershell / QuestCommandLets script that would list theSAM accountname, display name, DN, description, and title then export to CSV file
Powershell / QuestCommandLets script that would list
all users in a domain
SAM accountname, display name, DN, description, and title
export to CSV file
Windows Server 2003
8/22/2022 - Mon
# Script source:
# Description: This script will search and find all active directory users in particular domain
# How to use this script:
# Create New Directory Service Object
$objDomain = New-Object System.DirectoryServices.D
$Result = Get-QADUser -SearchRoot $objDomain.distinguishedNa
me -LdapFilter "(proxyAddresses=smtp:*@te
st.com)" | Get-QADUser | Select Email,SamAccountName,Displ
$Ouput = $Result.Email+","+$Result.
$Ouput >> Output.txt
ASKER CERTIFIED SOLUTION
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.
SAMaccountname, display name, DN, description, title
in the example I provided
Chris has a great GUI tool for all theese stuffs
Cjwdev | AD Info - Active Directory Reporting
AdFind by joe but CLI
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
dsquery user forestroot -limit 0 | dsget user -samid -display -dn -desc -title >leon.txt
Will give you the results in text format, so open in Excel and then resave as CSV.
Alternatively look at some output formating using the same dsquery commands for data extraction.
Or just use CSVDE
csvde /f users.csv will export all users an all attributes to .csv format.
Open in Excel and delete the columns you don't want.
OR you can fine-tune the query to only export the fields you need:
csvde /f users.csv -r objectCategory=person -l "samaccountname, displayname, description, title"
Plans and Pricing
Certified Expert Program
© 1996-2023 Experts Exchange, LLC. All rights reserved. Covered by US Patent