I had issues trying to run powershell from sql agent but got the following to work:
(1) use the SqlCmd in the step.
(2) created a batch file that containted the following:
REM change to the correct drive
I:
REM change to my working directory
cd \mydir
REM now call powershell script
C:\WINDOWS\SysWOW64\windowspowershell\v1.0\powershell.exe -Nologo -NoProfile -Noninteractive -Command "& 'I:\DataXfer\ssh\myscript.ps1'"
-------------------------------------------------------
NOTE: the string following the -Command
you must have a "& '\pathname_script' "
-------------------------------------------------------