Hi,
I wrote a Powershell script to perform a task after a deployment. The task it needs to perform is not crucial and it may go wrong. I don’t want it to throw an error and impact the whole deployment, but I do want it to put the deployment in a “warning” state (yellow) - to attract attention.
I’ve experimented with Powershell exit codes and Write-Error, and saw that when the exit code is not 0 the deployment is in an “error” state. Same when I use Write-Error.
I was expecting Write-Warning to have the effect I am looking for, but the deployment is successful and green.
Perhaps there’s something I’m missing?
Thank you!
Diana