I'm using a script to install a MSI file in a remote machine. The script runs in VSCODE, writes to PowerShell terminal the exit code.
$msiProcess = Start-Process msiexec.exe -Verb "RunAs" -ArgumentList $msiHQArgs -Wait -PassThru
Write-Host $msiProcess.ExitCode
How do I display in this terminal the MSI status messages that appeared above the progress bar during installation phase such as "Copying file to...", "Create database...", "Roll back...", "Register..." etc...