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

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

1 Answer 1

up vote 7 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

 
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.