2

I have an Azure VM which is running the Windows Remote Management (WinRM) service. I am trying to run below command in Powershell (run as admin) but getting an error.

winrm quickconfig

Error:

Input Error: There is no script engine for file extension ".vbs"

In fact any WinRM related commands I try gives me the same error.

What could be the possible reasons for this error? Do I need to install an extension to make it run?

Any help would be appreciated. Thanks.

  • What OS is the VM running? What resources have you checked already? How was the OS provisioned (chef/puppet/manually) ? – Colyn1337 Aug 11 '16 at 18:57
  • It's running Windows Server 2012 OS and was provisioned manually – Bat_Programmer Aug 11 '16 at 23:41
  • There are a couple of solutions proposed here, see if some of them matches your issue. http://answers.microsoft.com/en-us/windows/forum/windows_xp-performance/error-there-is-no-script-engine-for-file-extension/ef023588-0c5c-4d37-a169-20eedb9c5a4c?auth=1 – proteus Aug 17 '16 at 02:21
  • Thanks @proteus. I used the `assoc .vbs=VBSFile` command and was able to re-associate the `.vbs` extension to Microsoft ® Windows Based Script Host. – Bat_Programmer Aug 17 '16 at 02:36

2 Answers2

2

The problem was that the .vbs extension was associated with the program Notepad++. And since winrm uses a vbs file to run it's commands, I did the following to re-associate the extension to Microsoft ® Windows Based Script Host.

  1. Run command prompt as admin and execute below:

    assoc .vbs=VBSFile

  2. Go to Control Panel -> Programs -> Default Programs -> Associate a file type or protocol with a specific program

  3. Select .vbs extension -> click on Change Program -> Select Microsoft ® Windows Based Script Host

Thanks @proteus for the link which directed me to the solution.

0

Run as admin on cmd:

regsvr32 vbscript.dll
HBruijn
  • 72,524
  • 21
  • 127
  • 192
Kunal
  • 11
  • 3