I think you have the 'wrong' path to the script, you'll need:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe With arguments : ".\copyfiles.ps1"
Look at my XML file:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe With arguments : ".\copyfiles.ps1"
Look at my XML file:
<ElementType>CustomUpdateElements.ScriptElement</ElementType>
<ScriptType>Powershell</ScriptType>
<Filename>.\Java-CleanUp.ps1</Filename>
<Arguments/>
<KillProcess>True</KillProcess>
<TimeBeforeKilling>6</TimeBeforeKilling>