Solved

Pass though "yes" answer in batch script

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lot of troubles with windows 10 7 54
MaxPosPhaseCorrection setting 3 23
see android hidden files 10 32
Windows DNS Server Caching 3 29
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
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…

803 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