Missing terminator in PowerShell CLI within a for loop using expanded variables
I want to use a for loop to replace only the 2nd match of a string in a file. To achieve this I use a PowerShell CLI command which has worked outside the for
loop.
Why does [Console]::Error.WriteLine appear to hijack For Loop output of Power Shell EncodedCommand in Batch For Loop?
Whenever I use [Console]::Error.WriteLine
to force write output to STDErr
when embedded in a PowerShell EncodedCommand
that’s called from inside a Batch Script For Loop
, the STDErr
text all appears to run as though it were “Front Loaded”, whereas ALL of the remaining functions/processes appear to run AFTER all STDErr
Output is long completed visually!