Solved

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

Posted on 2013-01-09
5
334 Views
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.
0
Comment
Question by:TWCMIL
  • 3
  • 2
5 Comments
 
LVL 57

Expert Comment

by:Mike Kline
ID: 38759447
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
 
LVL 1

Author Comment

by:TWCMIL
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!
0
 
LVL 57

Accepted Solution

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

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

Thanks

Mike
0
 
LVL 1

Author Closing Comment

by:TWCMIL
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!
0
 
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 :)
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Installing a printer using group policy preferences is not that hard let’s take a look at it. First lets open up your group policy console and edit the policy you want to add it to. I recommend creating a new policy for each printer makes it a l…
[b]Ok so now I will show you how to add a user name to the description at login. [/b] First connect to your DC (Domain Controller / Active Directory Server) SET PERMISSIONS FOR SCRIPT TO UPDATE COMPUTER DESCRIPTION TO USERNAME 1. Open Active …
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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 …

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now