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.5k times
15
-
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
19
Adding the parameter -quiet
to the quickconfig call will suppress the yes/no prompt, and do what you want.
winrm quickconfig -quiet
![](../../users/profiles/3038.webp)
sysadmin1138
- 131,083
- 18
- 173
- 296