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

I'm trying to issue the following command remotely:

netstat -ano > C:\output.txt

but cannot figure out how to do that with WMIC! Any idea?

I've got:

process call create netstat.exe 

working but I cannot figure out how to pass the -ANO nor the output. Help please :)

share|improve this question

1 Answer 1

When issuing remote commands, quote the entire string to execute, like:

wmic /node:remote_computer process call create "netstat.exe -ano > C:\output.txt"
share|improve this answer
You probably need to add a /output:stdout because it does not do this by default if you want the file on the remote computer (that is ambiguous in your question), or it will be a useless output file. It took me a long time with wmic to figure that out. –  ajstein Sep 23 '11 at 8:00
To add to the question, id like the output to be redirected to the remote machine (the issuer). Thanks! –  coddrego Sep 23 '11 at 15:29

Your Answer


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.