hey all,
i wrote a short PS script, all it does is:
invoke-expression "C:\uri\Attachmate\RSecure\ssh2.exe -W C:\uri.txt uguy@iinf102 ls /snapshots" | Out-File C:\output2.txt
"hello from scom15" | Out-File C:\output3.txt
I added the 2nd line just for checking.
when I run it from PS CMD it runs fine and i get the outputs into the 2 text files, however when i configure it to run in response to an alert in SCOM (using a command channel) the first command fails to execute and the output2.txt file remains blank.
I have no idea why there's a difference between running from SCOM or from PS shell.
Any help will be really really appreciated.
thanks,
Uri