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.
LVL 1
TWCMILAsked:
Who is Participating?
 
Mike KlineConnect With a Mentor Commented:
You should be able to use Get-ADComputer

Get-ADComputer -Filter * -Properties * | Format-Table Name, Description

Thanks

Mike
0
 
Mike KlineCommented:
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
0
 
TWCMILAuthor Commented:
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!
0
 
TWCMILAuthor Commented:
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!
0
 
Mike KlineCommented:
no problem, and you can do this with vbscript...but learning powershell is much better for future jobs :)
0
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.

All Courses

From novice to tech pro — start learning today.