Hi Daniel,
Image may be NSFW.
Clik here to view.
In your ps1 script, you have to manage the return code or it will always return '0'.
i created a customer update and a the powershell task and return code static "0".If you return a static code, this mean that the CustomUpdate Engine will always return this code. '0' mean that all is fine. You should set the 'Script-Item' to store the return code into a variable and return this variable at the end of the custom update.
Image may be NSFW.
Clik here to view.

In your ps1 script, you have to manage the return code or it will always return '0'.
but i can't found the saplogon.ini in %windir%.Many things can explain this :
- You may have forgot to add the 'SapLogon.ini' file to the additional file when you create the update :
Image may be NSFW.
Clik here to view. - Computers may not be allowed to execute Powershell Script. See Set-ExecutionPolicy
- The Powershell script may not be able to translate the environement variable that you are using "$env:windir". If you don't have check the option "Can request user input", the update is deploy with the 'System' Account, so environnement variable have no meaning. Try to check this option.