1 of 1 people found this helpful
Looking at your script if you are calling and AD cmdlet from a WinRM server you will need a PSCred object be passed to authenticate the request. I had this problem on a customer site.
The alternative is to try something really simple like writing a text file to the WinRM C:\ that then runs locally, that way you can confirm the WinRM server works and HEAT can call to it and run a script. Helps rule out security/permissions issues.
I never thought of that, I was thinking it would use the remote host creds to run the script. The script appears to be working now. Thank You.
One more question, did you get the output to show in Heat in your script? I'm not sure what its looking for to be passed back into Heat to show. This is what returns when the script is run.
You can add a field to your business object and direct the output from the script to that field. You can just see the field in my last post Output field.
Found the culprit. There was carriage return on the return statement that I wasn't seeing until I opened up the script in ISE. The message box is working correctly now. Thanks Alasdair.