In a SD Package a procedure executing a powershell script does not redirect the output to Job output file.
>$rf parameter does not work.
Example :
CA Client Automation - All Version.
sdjesdprocedureexecu|000533|NOTIFY | SDJESDProcedureExecutorIf::Execute executing powershell.exe -File test.ps1 2>&1 >C:\PROGRA~2\CA\DSM\Agent\units\00000001\usd\sdjexec\D7910711-BE01-48DE-9887-4B1FECECABAA.res
As solution create a .bat file which executes the powershell.exe script.
Example :
1- Create a file test.bat containing these lines :
@echo off
powershell.exe -ExecutionPolicy ByPass -File test.ps1
2- Create a procedure with test.bat and 2>&1 >$rf in parameters