• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

Domain Computer List

This question is in conjunction with http://www.experts-exchange.com/Networking/Windows_Networking/Q_22447515.html?cid=239#a18724806
for fairness of awarding points to AnthonyP9618

Is there any way I could export a list of domains computers from the domain controller???
0
gvector1
Asked:
gvector1
1 Solution
 
kadadi_vCommented:
Means active directory integrated with dns server configured on the windows server...?
When you goto the active directory users & computers in administrator tools (run as admin)then right click to computers and clecik on export list and save as a txt file...


Regards,

V.K.
0
 
Chris DentPowerShell DeveloperCommented:

Sure, are you happy with dsquery? Nice and straight forward :)

You'll have to clean it up a little afterwards, two find and replace should do. One to get rid of the spaces at the start, the second to get rid of the $.


dsquery computer -limit 0 | dsget computer -samid > outputfile.txt


I can give you alternatives involving VbScript and such as well if you wish, depends a little on what your aim is.

Chris
0
 
AnthonyP9618Commented:
If you want a scripted solution you could use what I posted in the other question:

dsquery computer ou=sales,dc=microsoft,dc=com > C:\file.txt

Or.. As RobWill suggested, right clicking on the Computers OU (If that's where all your computers are located at) and choosing Export List will work as well.

Or.. are you looking for something more robust?
0
 
gvector1Author Commented:
Those worked great, I ended up using SpiceWorks to export a list to Excel, so I could remove columns and end up with a list of just machine names.  That way I could execute a command and have a file with a list of machine names to use as a parameter.  

Thanks
Kendal
0
 
AnthonyP9618Commented:
Kendal,

Great!  

-Anthony
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now