[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 343
  • Last Modified:

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.
0
TWCMIL
Asked:
TWCMIL
  • 3
  • 2
1 Solution
 
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
 
Mike KlineCommented:
You should be able to use Get-ADComputer

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

Thanks

Mike
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now