Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to configure winrm in all my clients using a bat file. after running bat file winrm quickconfig command there's a prompt for a yes/no answer. I don't know how to answer "yes" in the batch file.

share|improve this question
Can you post the script you have written ? – Abhijeet Kasurde Sep 15 '12 at 16:01
this is the code : winrm quickconfig and i tried to force a yes answer by using "echo y" and that didin't work. – dave Sep 15 '12 at 22:23
In general, if you want to run an interactive command-line tool non-interactively, you need to find a command line switch. Often, it's something like /y, -y, /q, -q (for "yes" or "quiet"). Generally, more details can be found by running command /? (Windows/DOS), cmnd --help or man cmnd (Unix/Linux), or Get-Help Ridiculously-Long-Command-Name (PowerShell). – Skyhawk Sep 25 '12 at 22:33
up vote 9 down vote accepted

Adding the parameter -quiet to the quickconfig call will suppress the yes/no prompt, and do what you want.

winrm quickconfig -quiet
share|improve this answer
well! that worked! Many TNX – dave Sep 15 '12 at 22:22

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.