Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WinRM Failing

821 views
Skip to first unread message

JonnyG

unread,
Mar 10, 2010, 11:57:01 AM3/10/10
to
Hi All,

Not sure if this is the correct place to be posting this question but I'm
having problems with a server where WinRM is configured. I used
enable-psremoting to do this. However when I try to remote connect to this
server I get the following

Enter-PSSession : Connecting to remote server failed with the following
error message : <f:WSManFault xmlns:f="http://s
chemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2147749890"
Machine="xxxxxxxxxxx"><f:Message></f:Message></f:WSManFault> For more
information, see the about_Remote_Troubleshooting Help topic.

Any help much gratefully received as I cannot find anything related to the
error code

JonG

Marco Shaw [MVP]

unread,
Mar 10, 2010, 4:56:01 PM3/10/10
to
First off is to make sure you're using the same version of PowerShell
v2/WinRM 2 on both ends. For example, you can't mix a RTM with a RC
version.

Marco

"JonnyG" <Jon...@discussions.microsoft.com> wrote in message
news:AB5A17FE-FD9C-48E2...@microsoft.com...

JonnyG

unread,
Mar 10, 2010, 6:35:01 PM3/10/10
to
Hi Marco

output from $PSVersionTable on both ends

Name Value
---- -----
CLRVersion 2.0.50727.3603
BuildVersion 6.0.6002.18111
PSVersion 2.0
WSManStackVersion 2.0
PSCompatibleVersions {1.0, 2.0}
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.1

JonG

"Marco Shaw [MVP]" wrote:

> .
>

Marco Shaw [MVP]

unread,
Mar 11, 2010, 8:47:20 AM3/11/10
to
Are they both domain members and of the same domain?

Marco

"JonnyG" <Jon...@discussions.microsoft.com> wrote in message
news:AB5A17FE-FD9C-48E2...@microsoft.com...

Marco Shaw [MVP]

unread,
Mar 11, 2010, 8:48:41 AM3/11/10
to
Make sure to have a read of this:
http://powershell.com/cs/blogs/news/archive/2010/03/03/administrator-s-guide-to-powershell-remoting.aspx

I haven't loooked at it yet, so I don't know if it has any troubleshooting
information, but I seem to remember it being almost 40 pages, so I'd assume
it would have a section on how to find problems.

Marco

"JonnyG" <Jon...@discussions.microsoft.com> wrote in message
news:AB5A17FE-FD9C-48E2...@microsoft.com...

JonnyG

unread,
Mar 11, 2010, 10:51:01 AM3/11/10
to
no they are in different domains but I'm passing credentials with the request
and it works ok to another machine in the same domain so I think it's machine
specific if i could just work out what the error code is actually telling me.
I'll take a look the book you recommended thanks

Jon

"Marco Shaw [MVP]" wrote:

> .
>

alexandair

unread,
Mar 11, 2010, 2:48:12 PM3/11/10
to
If the local computer and a remote one are in different domains, then
HTTPS transport must be used or the destination machine must be added
to the TrustedHosts configuration setting on the local machine. (Also,
use the Credential parameter in all remote commands, even when you are
submitting the credentials of the current user.)

The TrustedHosts list can contain a comma-separated list of computer
names, IP addresses, and fully-qualified domain names. Wildcards are
permitted. Only members of the Administrators group on the computer
have permission to change the list of trusted hosts on the computer.

To view the list of trusted hosts, use the following command:

get-item wsman:\localhost\client\trustedhosts

To add all computers to the list of trusted hosts, use the following
command:

set-item wsman:localhost\client\trustedhosts *

The following command adds all of the computers in the OtherDomain
domain to the list of trusted hosts:

set-item wsman:localhost\client\trustedhosts *.otherdomain.com

To add the names of particular computers to the list of trusted hosts,
use the following command format:

set-item wsman:\localhost\client\trustedhosts server01.otherdomain.com

To add the IP addresses of particular computers to the list of trusted
hosts, use the following command format:

set-item wsman:\localhost\client\trustedhosts 192.168.200.10

You can also use Concatenate parameter to add new entries without
overwriting existing ones.

-aleksandar
http://powershellers.blogspot.com

On Mar 11, 2:48 pm, "Marco Shaw [MVP]" <marco.shaw@NO_SPAMgmail.com>
wrote:
> Make sure to have a read of this:http://powershell.com/cs/blogs/news/archive/2010/03/03/administrator-...

JonnyG

unread,
Mar 12, 2010, 11:57:01 AM3/12/10
to
Thanks for the clarification however I'm already using the <local> special
case as the machine is local to me just not in my domain. I can connect
successfully to other machine and even a machine that it logically sat right
next to this one just 1 ip away.

JonG

"alexandair" wrote:

> .
>

Dan Mork

unread,
Mar 22, 2010, 3:42:55 PM3/22/10
to
Have you tried this?
http://twitter.com/humanstuff/status/10628646822

Cheers,
Dan Mork

Larry__Weiss

unread,
Mar 23, 2010, 7:16:07 PM3/23/10
to
Just in case that tweet expires, here is what it said:

If you get a WSManFault with an error code of 2147749890 when
remoting try adding
"-SessionOption (New-PSSessionOption -NoMachineProfile)"

JonnyG

unread,
Mar 26, 2010, 5:03:01 AM3/26/10
to

Hi Dan,

Thanks that option now allows me to connect. Guess the question now is why
does not loading the profile resolve the problem.

JonG

"Dan Mork" wrote:

> .
>

lukaszek

unread,
Jan 10, 2014, 3:06:50 AM1/10/14
to
Hi.
In my case this problem was generated by damaged WMI repository. There is a recipe how to repair all repository, but in my case (Windows 2003 x64) rebuilding only winrm entries was enough: "mofcomp c:\windows\system32\winrmprov.mof"

sdmo...@gmail.com

unread,
Nov 15, 2015, 11:10:22 AM11/15/15
to
MOFCOMP.EXE worked for me to resolve this issue. I combined the -SessionOption parameter and invoked the MOFCOMP.EXE to fix the server remotely:

invoke-command -ComputerName <server> -SessionOption (New-PSSessionOption -NoMachineProfile) {mofcomp c:\windows\system32\winrmprov.mof}
0 new messages