Link to home
Start Free TrialLog in
Avatar of TWCMIL
TWCMIL

asked on

Need script to produce a list of computer accounts with descriptions in a given OU

Looking for a script that will give me a list of computer accounts (text file or CSV) in a given OU along with the description field.
Avatar of Mike Kline
Mike Kline
Flag of United States of America image

Lots of ways, if you like GUIs, adinfo is a great free tool

http://www.cjwdev.co.uk/Software/ADReportingTool/Info.html

I like adfind (free command line tool from MVP Joe Richards)

http://www.joeware.net/freetools/tools/adfind/index.htm

adfind  -b "DN of your OU"  "objectcategory =computer" name description -csv > computers.csv

You can also use csvde, powershell, and other methods.

Thanks

Mike
Avatar of TWCMIL
TWCMIL

ASKER

Hi Mike -- Both solutions appear to provide me with the data I need, I was just hoping to get either a VB or PowerShell script so that I could take a look and see how it was done via one of those methods. If no-one has a script that will do this, I will accept your answer as the solution. Either way, I'll give you partial credit. Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Mike Kline
Mike Kline
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TWCMIL

ASKER

That's exactly what I was looking for. The other tools were good, but I'm trying to get a handle on how to do some of this stuff via script. Thanks!
no problem, and you can do this with vbscript...but learning powershell is much better for future jobs :)