0

I have a machine that has Windows Server 2012 R2 installed on it. I just installed RSAT on my ThinkPad Tablet which runs Windows 8.1. I'm trying to add my server in the client's trusted host list with -

winrm set winrm/config/client @{TrustedHosts=”MyServer”}

But getting the error message that says -

Syntax error: input must be of the form {key ="value"[;key="value"]}

I ran into the same issue while I was trying this same thing on my desktop machine, but somehow I fixed it and I cannot remember exactly how. Only difference is my desktop machine runs 64bit Windows 8.1 and my tablet runs 32bit Windows 8.1.

Can anyone help?

atiyar
  • 133
  • 2
  • 8

2 Answers2

1

If you copied a command from a website, then the double quotes are probably the wrong character. If you copy the command into Notepad (font = Lucida Console), you'll be able to notice the difference between command-line compatible double quotes and formatted/stylized quotes that will fail. I just spent 30min figuring this out then remembered I had the same problem years ago...

0

Documentation suggests using single quotes around the argument

winrm s winrm/config/client '@{TrustedHosts="RemoteComputer"}'

Dan
  • 661
  • 4
  • 7
  • On my Desktop machine to make it work I never had to put those single quotes. But I'll try it and let you know. Can you please give a link of the documentation you are referring to? – atiyar Feb 11 '15 at 07:09
  • https://technet.microsoft.com/en-us/magazine/ff700227.aspx – Dan Feb 12 '15 at 09:58
  • Nope. Just tried with single quotes. It says `Invalid use of command line. Type "winrm -?" for help`. – atiyar Feb 14 '15 at 18:53