0 Replies Latest reply on Nov 10, 2017 1:26 PM by csasser

    SAM Remote PowerShell Script returning wrong results

    csasser

      Using SAM 6.3. Built a custom component monitor that executes a PowerShell script against the remote server that checks for a specific registry entry.

       

      Facts:

      1. The script is very basic
      2. The script has no parameters
      3. Remote PowerShell and all the permissions is configured. See this post: Re: Unable to get a remote Powershell script running
      4. Execution Mode: Remote Host
      5. URL prefix: wsman
      6. Port Number: 5985
      7. The Node access account is an Admin on the Node.
      8. When I run the script on the server (via RDP), it executes and returns a "1" indicating an error.
      9. When running through the SAM, it returns a 0 for the same server.

       

      What is more frustrating is that it is not timing out or causing an error, but completing the script with a statistic of "0" as in a success.

       

       

      Any and all suggestions are appreciated.

       

       

       

      ****EDIT****

      We got this working through permissions. The User Account could not inherit from the node; we had to manually assign to each use of the component the user account as the appropriate service account.