Question

Locked

running defrag via psexec

By Bowen1973 ·
I am using psexec to run a remote command to defrag computers on our network, but i want the output into a text file so i can review them afterwards instead of watching the screen run. the problem i have is that the .txt file will be overwritten each time it starts a defreag on a new machine.

How can i get it to name the text file the same name as the computername?? i have tried %computername% but this just save the file as the local compuer name....

'psexec @computerlist.txt -u username -p password Defrag c: /f >%computername%.txt'

Please help.

thanks

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Back to Desktop Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums