PowerShell tee-Object generates empty lines in output, when used in db2 commands
问题 When I use powershell tee-object cmdlet to save the output to a file, blank lines are created between each actual line. Output gets doubled and ugly, in both screen output, as well in the redirected file. regular command, and output: # db2 connect to sample Database Connection Information Database server = DB2/NT64 11.5.0.0 SQL authorization ID = SAMUEL Local database alias = SAMPLE but, when you use Tee-Object against it... here is what happens: # db2 connect to sample | Tee-Object test.out