Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


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

Posted on 2013-01-09
Medium Priority
Last Modified: 2013-01-11
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.
Question by:TWCMIL
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 57

Expert Comment

by:Mike Kline
ID: 38759447
Lots of ways, if you like GUIs, adinfo is a great free tool


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


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

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



Author Comment

ID: 38767875
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!
LVL 57

Accepted Solution

Mike Kline earned 2000 total points
ID: 38767907
You should be able to use Get-ADComputer

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



Author Closing Comment

ID: 38768423
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!
LVL 57

Expert Comment

by:Mike Kline
ID: 38768437
no problem, and you can do this with vbscript...but learning powershell is much better for future jobs :)

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question