Wednesday, December 23, 2009

How to get list of machines by OS type from Active Directory

To list of all computers that have a Windows XP OS use the following below command:

dsquery * domainroot -filter "(&(objectCategory=computer)(operatingSystem=Windows XP*))"
 
To list of all computers that have a Windows Server OS use the following below command:


dsquery * domainroot -filter "(&(objectCategory=computer)(operatingSystem=Windows Server*))"

No comments:

Post a Comment