Recently, we came across an interesting bug that had been around for awhile (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=315875). If you do the following:
Start-Transcript ipconfig Stop-Transcript
If you look at the transcript, you’ll see that the output of ipconfig was not captured.
PowerShell recognizes that ipconfig is a native console application. Since many of these applications do direct writes to the console buffer (i.e. more.com, edit.com etc.), we don’t direct the output handles. Because of that, we can’t capture their output directly. This renders the transcription framework ineffective because the Out-Default cmdlet is unable to capture anything from ipconfig.
The workaround is actually quite simple. All you have to do is to pipe the output from ipconfig.exe to Out-Default.
Start-Transcript ipconfig | Out-Default Stop-Transcript
Tianjie (James) Wei [MSFT] Software Design Engineer Windows PowerShell Team