Configure WinRM using a .bat file without yes/no prompt

24,384

Adding the parameter -quiet to the quickconfig call will suppress the yes/no prompt, and do what you want.

winrm quickconfig -quiet
Share:
24,384

Related videos on Youtube

dave
Author by

dave

Updated on September 18, 2022

Comments

  • dave
    dave over 1 year

    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.

    • Taylor McKay
      Taylor McKay over 11 years
      Can you post the script you have written ?
    • dave
      dave over 11 years
      this is the code : winrm quickconfig and i tried to force a yes answer by using "echo y" and that didin't work.
    • Hecter
      Hecter over 11 years
      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).
  • dave
    dave over 11 years
    well! that worked! Many TNX