none
Why is piping tee with -verbose NOT working? RRS feed

  • Question

  • Suppose I have the following

    $csvfiles | ForEach-Object {Import-Csv "$csvLocation\$_"; Remove-Item "$csvLocation\$_" -Verbose | tee .\log.txt -Append} | 
                Export-Csv -NoTypeInformation "$csvLocation\$DBName.csv" -force

    I can see the verbose output on console

    VERBOSE: performing remove operation on file...

    but tee is not appending that to the log file. How can I tee the -verbose output to the file? 

    Tuesday, May 28, 2019 11:29 PM

Answers

All replies