Here\'s my configuration:
On the build log, I only see the output of the first
You could try putting the brace opening the block on the same line as the If.
I.e.,
If ('1' -eq '1') { ... } Else { ... }
That's the usual styling you see with Powershell, and obviously, putting the braces on the next line can cause problems.