Excellent.
 
One change though...
 
Use
 
objectcategory=computer
 
versus
 
objectclass=computer
 
unless you are one of those smart folks who already indexed objectclass.
 
   joe


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jorge de Almeida Pinto
Sent: Saturday, April 09, 2005 11:28 PM
To: [email protected]
Subject: RE: [ActiveDir] Retrieving computer accounts

Hi,
 
For each domain in the forest
AdFind.exe  -b DC=W2K3DOMAIN,DC=LAN -f "&(objectClass=computer)(operatingSystem=Windows XP Professional)"
 
You can't through this query against a GC as the attribute "operatingSystem" is not in the PAS.
 
You could also use OLDCMP (which generates a very nice HTML page!)
OLDCMP -report -age 0 -b DC=W2K3DOMAIN,DC=LAN -f "&(objectClass=computer)(operatingSystem=Windows XP Professional)"
 
With both you could also additionally use the "operatingSystemServicePack" attribute to search for XP computers with a certain SP
For SP0: operatingSystemServicePack=<empty>
For SP1: operatingSystemServicePack=Service Pack 1
For SP2: operatingSystemServicePack=Service Pack 2
 
Cheers
Jorge

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave A. Marquis
Sent: Friday, April 08, 2005 16:37
To: [email protected]
Subject: [ActiveDir] Retrieving computer accounts

Hello All,

 

Does anyone know a script that will gather all computer accounts in a forest? I want to build a list of computer names so I can make a script to send the Win SP2 package to the file system, but not install it.

 

Dave

This e-mail message, including all attachments, is for the sole use of the intended recipients(s) and may contain confidential and privileged information. You may NOT use, disclose, copy, or disseminate this information. If you are not the intended recipient, please contact the sender by reply e-mail immediately. Please destroy all copies of the original message and all attachments.


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

Reply via email to