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.
Asked
Active
Viewed 2.7k times
17
-
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. – Steve 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 Answers
21
Adding the parameter -quiet
to the quickconfig call will suppress the yes/no prompt, and do what you want.
winrm quickconfig -quiet

sysadmin1138
- 133,124
- 18
- 176
- 300