Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Please help me to create a batch file to run the below command (multiple computers) and the result to a text file.

dtcheck "computername" /cmd="version"
share|improve this question
add comment

1 Answer

I am not sure if it can do multiple PCs into one text file, but here is how the batch file code:

@echo off
dtcheck "computername" /cmd="version" >drive:\path\[name of the text file].txt
exit

Copy and paste it into notepad and save with .bat extensions, substitute the names and you should be all set to go.

If you need to have it run on multiple PCs, just change the name of the txt file to reflect a name of that PC and save them all to a network drive.

That would be my 2 cents. Hope that helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.