Stiltz79 wrote: » I am trying to use DSQuery to pull some information out of AD for a project I am working on at work. I am trying to pull a list of users that belong to a certain AD Group. In that list I need their names and Mobile Phone Numbers. How can I accomplish this?
get-QADgroupmember "Domain Admins" | get-QADUser | select-object DisplayName,MobileNumber | export-csv c:\scripts\output\MobileNumbers.csv
Claymoore wrote: » Stop using old tools and use powershell. Go grab the Quest ADCmdlets:PowerShell Commands (CMDLETs) for Active Directory by Quest Software This command should get you the information and output it to a usable list. I don't have a way to test it right now, but make sure the commands are all on one line. You will also need to make sure the directories exist before you export the file.get-QADgroupmember "Domain Admins" | get-QADUser | select-object DisplayName,MobileNumber | export-csv c:\scripts\output\MobileNumbers.csv
Stiltz79 wrote: » Code writing is difficult, as to why I'm not a programmer.
undomiel wrote: » You would also need to pipe it through dsget user to get the info he's looking for i.e. dsquery -name "Domain Admins" | dsget group -members | dsget user -display -mobile
dsquery [B]group[/B] -name "Domain Admins" | dsget group -members -expand | dsget user -c -display -mobile > file.txt