Link to home
Start Free TrialLog in
Avatar of Arabsoft-ACS
Arabsoft-ACSFlag for Saudi Arabia

asked on

way to list all computers in AD

Dear All,

Im looking for a way to list all computers type I have in my domain, the result like:
XP SP1 100
2000 PRO 200

Note: I have 6 domains which I need to know the clients in each of them

Can you help please?

Thanks
Avatar of Mike Kline
Mike Kline
Flag of United States of America image

Use that same great adfind tool I suggested for the users question last night
adfind -default -f objectcategory=computer   name operatingsystem -csv >  c:\ComputersOS.csv
That will give you a csv on your C drive with the machine names and the OS.
 Thanks
Mike
Im gonna go with my old standby of the DS series of tools again.

The queries would be something like this

windows 2000
dsquery computer * -filter "(&(objectCategory=computer)(operatingSystem=windows 2000*))"

windows xp
dsquery computer * -filter "(&(objectCategory=computer)(operatingSystem=windows xp*))"

server 2003
dsquery computer * -filter "(&(objectCategory=computer)(operatingSystem=windows server 2003*))"
Hi,
You can also use a web Base application name as ADManager Plus to get the reports of Computer Account in Active Directory forest.
Its free for 30 days &.
http://www.manageengine.com/products/ad-manager/download.html

Regards,
Chandar Singh
Avatar of Arabsoft-ACS

ASKER

I just looking for count of the OS
XP - 200
Win2000 - 462

Just Count
Dear mkline71,

The result appear like:
CN=ZAJIL,CN=Computers,DC=noce,DC=com,"ZAJIL","Windows Server 2003"

is there a way to make better than this, like

ComputerName                           OS
Zajil                                    windows 2003


Also, is there a way to count the result:
windwos 2003 ---- 512 computers

thanks
adfind -default -f objectcategory=computer   name operatingsystem -csv -nodn  >  c:\ComputersOS.csv
Try that to get rid of the DN, and open it using excel.
No way to get the count like that but if you do something like
adfind -default -f  "&(objectcategory=computer)(operating system= Windows Server 2003)"  -c
That will give you a count of Windows server 2003 machines (-c switch is for count in adfind)
I try this

adfind -default -f  "&(objectcategory=computer)(operating system= Windows Server 2003)"  -c

the result:
0 Objects returned

Sure i have a lot of windows 2003
ASKER CERTIFIED SOLUTION
Avatar of Premkumar Yogeswaran
Premkumar Yogeswaran
Flag of India 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
Dear premglitz.

it's work fine.

can you please tell me how to check for:
windows Vista
windows 7
windows NT

Thanks
HI Arabsoft-ACS,
Find the query for the Vista & Windows 7

Vista:
(&(&(sAMAccountType=805306369)(objectCategory=computer)(operatingSystem=windows vista*)))

Windows 7:
(&(&(sAMAccountType=805306369)(objectCategory=computer)(operatingSystem=windows 7*)))

am not sure about the Windows NT will let you know soon...!
Thanks for the grad and

Wish you a HAPPY NEW YEAR 2010....!

:-)