Some powershell users make use of a powershell profile. The default settings load the powershell profile each time a powershell process starts. Sometimes the powershell profile of a user interfer with the powershell script being run as a script action which gives rise to unexpected behavior.
Much more often than not (I think) it's not necessary or wanted to load the users powershell profile when running a script action.
The powershell script action should therefore include the -noprofile parameter as a default parameter which is prefilled in the parameters box.