powershellwsman

Test WSMan in powershell


I am trying to take backup of my server from client machine using powershell.

i am trying to execute a batch file which is on my server, but i am not able to make connection with my server. I searched a lot and tried

Test-WSMan : The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or i
f the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be a
dded to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the Tru
stedHosts list might not be authenticated. You can get more information about that by running the following command: wi
nrm help config.
At line:1 char:11
+ Test-WsMan <<<<  182.50.121.100 -credential $cred -authentication default
    + CategoryInfo          : InvalidOperation: (182.50.121.100:String) [Test-WSMan], InvalidOperationException
    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.TestWSManCommand

can any one tell me how can i execute the bat file step by step


Solution

  • Have you added your host name or IP in "GPEDIT" i.e.Group Policy and enabled to use fresh credentials?

    Please follow the step if you might have missed something.

    (http://www.ifunky.net/Blog/post/How-To-Enable-PowerShell-Remoting-(WinRM).aspx ,

    http://blog.crayon.no/blogs/janegil/archive/2010/03/04/enable_2D00_and_2D00_configure_2D00_windows_2D00_powershell_2D00_remoting_2D00_using_2D00_group_2D00_policy.aspx)

    They have enough information to get started. Sometimes if everything is enabled its a best idea to restart remote management services.