How do redirect PRINT message from SQL script to output file via powershell 2.0 ? I tried the -verbose command, I can see the verbose message from powershell command line, but it doesn't write the message to output file.
Invoke-SqlCmd -InputFile $SqlFile -verbose | Out-File -filePath "D:\Output\Text.log