Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Pass though "yes" answer in batch script

Posted on 2014-03-12
3
Medium Priority
?
1,667 Views
Last Modified: 2014-03-13
I am looking to create a batch file to configure WinRM on all windows 7\8 desktops. The command is "winrm quickconfig"

When I run this from a command prompt you have to answer two questions with "y" or "yes." How do I pass those answers through to the batch script to automate the command?
0
Comment
Question by:GR JN
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 17

Accepted Solution

by:
Chris Millard earned 1500 total points
ID: 39923978
add the -quiet switch at the end of the command:-

winrm quickconfig -quiet

Open in new window

0
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 39924122
Also you can use below command,

%SendKeys% "y{ENTER}"
0
 
LVL 3

Expert Comment

by:Jeremy Tyre
ID: 39924440
Or you could try:

ECHO y | winrm quickconfig

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question