18

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.

3
  • Can you post the script you have written ? Sep 15, 2012 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.
    – Steve
    Sep 15, 2012 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, 2012 at 22:33

1 Answer 1

22

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

winrm quickconfig -quiet
1
  • 1
    well! that worked! Many TNX
    – Steve
    Sep 15, 2012 at 22:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .