Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to pass a netstat -t -b 90 command and tell the prompt to simultaneously or successively perform this command to launch network monitor start netmon /autostart.

share|improve this question
add comment

2 Answers

The Start-Job command in PowerShell will do what you want. You'll want to use it in conjunction with Wait-Job and Receive-Job.

For example:

$netstat = Start-Job {netstat -t -b 90}
$ping = Start-Job {ping 192.168.1.1}
Wait-Job $netstat,$ping
Receive-Job $netstat,$ping

The first two lines will begin the netstat and ping jobs, and store the job objects. Wait-Job will wait until the two jobs are finished. Receive-Job displays the output.

share|improve this answer
    
thankyou so much for your help –  Andres V Meza III May 26 '13 at 2:21
add comment

You could use start-process, if you're not picky about launching them in a separate window rather than in the background.

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.