Solved

Pass though "yes" answer in batch script

Posted on 2014-03-12
3
1,530 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 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

749 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