Trusted Contributor.. BabuSH Trusted Contributor..
Trusted Contributor..
3581 views

How to execute Powershell in OO

Jump to solution

Hi ,

 

Can anybody help me in executing Powershell script from OO.I had tried execute on sample script to fetch remotesystem name.I am getting the below mentioned error.

 

{returnCode=1;returnResult=Could not connect to host. ;Result=1;sessionId=172e735e-230a-4f45-a451-68ee55353525;exception=dotNETWebActions_PowerShell.PowerShellExceptions.SessionException: Could not connect to host.  ---> System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server failed with the following error message : The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You can get more information about that by running the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.
   --- End of inner exception stack trace ---
   at PowerShellV2.PSRunspaceV2.NewRemoteSession(String host, PSCredential credential, AuthenticationMechanism authentication)
   at PowerShellV2.PSRunspaceV2.CreateRunspace(String host, PSCredential credential, AuthenticationMechanism authentication)
   at PowerShellV2.PSRunspaceV2.CreateNewRunspace()
   at PowerShellV2.PSRunspaceV2..ctor(PSAuthenticationInfo authInfo)
   at PowerShellV2.PowerShellFactoryV2.CreateRemoteRunspace(PSAuthenticationInfo psAuth, Boolean keepSessionAlive, Boolean enablePiping)
   at PowerShellCommon.PowerShellFactory.CreateRunspace(PSAuthenticationInfo authInfo, Boolean keepSessionAlive, Boolean enablePiping)
   at dotNETWebActions_PowerShell.IActions.PowerShellBaseAction.GetPSRunspace(ActionRequest req, ISession s)
   at dotNETWebActions_PowerShell.IActions.PowerShellBaseAction.ExecutePowerShell(ActionRequest req, ISession s, IActionRegistry reg);}

 

Note: Both OO and Test server on workgroup

I had kept the sample script in test sever & trying to execute.

Do I need install & enable anything @ OO server & test servers to execute powershell scripts

Hussain
Labels (1)
0 Likes
1 Solution

Accepted Solutions
Absent Member.. ntt00015 Absent Member..
Absent Member..

Re: How to execute Powershell in OO

Jump to solution

Hi,

 

May be these articles help : http://technet.microsoft.com/en-us/library/dd347642.aspx and http://social.technet.microsoft.com/Forums/en-US/winservercore/thread/ee86c814-0932-4380-be9c-cd40adbbdaf9

 

According to the error message I think at the remote host your remote connection port(WS-Management service) is closed. Check the host machines remote connection service. And be sure that username&password is correct. have you checked the WMI service of the host. http://msdn.microsoft.com/en-us/library/windows/desktop/aa826517(v=vs.85).aspx

And for powershell scripting check this site. http://technet.microsoft.com/en-us/library/ee176949.aspx

0 Likes
1 Reply
Absent Member.. ntt00015 Absent Member..
Absent Member..

Re: How to execute Powershell in OO

Jump to solution

Hi,

 

May be these articles help : http://technet.microsoft.com/en-us/library/dd347642.aspx and http://social.technet.microsoft.com/Forums/en-US/winservercore/thread/ee86c814-0932-4380-be9c-cd40adbbdaf9

 

According to the error message I think at the remote host your remote connection port(WS-Management service) is closed. Check the host machines remote connection service. And be sure that username&password is correct. have you checked the WMI service of the host. http://msdn.microsoft.com/en-us/library/windows/desktop/aa826517(v=vs.85).aspx

And for powershell scripting check this site. http://technet.microsoft.com/en-us/library/ee176949.aspx

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.