Scripting Question

Using DSQuery command to pull back number in folder

12/05/2013 2361 views

Is it possible to use the DSQuery command to pull back the number of computers in a particular folder? Or if I give it the start of how we name our computers, could it pull back how many start with a particular prefix? (Ours start SiteName-RoomNumber-ComputerNumber, if I give it SiteName-RoomNumber could it come back and tell me there are 10 machines that start with a particular prefix?)

Answer Summary:
0 Comments   [ + ] Show comments


All Answers


yes using dsquery computer -name

Searches for computers whose name attributes (value of CN attribute) matches <Name>. For example, "jon*" or "*ith" or "j*th".


Answered 12/05/2013 by: SMal.tmcc
Red Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ