`Invoke-SqlCmd` does not display RAISERROR messages where `sqlcmd` does
According to the documentation for Invoke-Sqlcmd, you can use -verbose to display the output messages.  From that post:
Example 5: Run a query and display verbose output
PS C:\&gt; Set-Location &quot;SQLSERVER:\SQL\MyComputer\MainInstance&quot;
PS C:\&gt; Invoke-SqlCmd -Query &quot;PRINT N'abc'&quot; -Verbose
VERBOSE: abc

I have bat file processes that use this technique and pipe the output of the messages to a file.  Example:
-Verbose 4&gt;&amp;1&gt; 'C:\AperioSync\SyncOutput.txt'&quot;