{"id":3221,"date":"2010-01-04T13:06:48","date_gmt":"2010-01-04T13:06:48","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2010\/01\/04\/workaround-for-start-transcript-on-native-processes\/"},"modified":"2019-02-18T13:06:02","modified_gmt":"2019-02-18T20:06:02","slug":"workaround-for-start-transcript-on-native-processes","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/workaround-for-start-transcript-on-native-processes\/","title":{"rendered":"Workaround for Start-Transcript on native processes"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Recently, we came across an interesting bug that had been around for awhile (<a href=\"http:\/\/connect.microsoft.com\/PowerShell\/feedback\/ViewFeedback.aspx?FeedbackID=315875\">http:\/\/connect.microsoft.com\/PowerShell\/feedback\/ViewFeedback.aspx?FeedbackID=315875<\/a>). If you do the following:<\/p>\n<p>Start-Transcript   <br \/>ipconfig    <br \/>Stop-Transcript<\/p>\n<p>If you look at the transcript, you\u2019ll see that the output of ipconfig was not captured. <\/p>\n<h2>Why is this happening?<\/h2>\n<p>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\u2019t direct the output handles. Because of that, we can\u2019t capture their output directly. This renders the transcription framework ineffective because the Out-Default cmdlet is unable to capture anything from ipconfig. <\/p>\n<h2>How can we work around it?<\/h2>\n<p>The workaround is actually quite simple. All you have to do is to pipe the output from ipconfig.exe to Out-Default.<\/p>\n<p>Start-Transcript   <br \/>ipconfig | Out-Default    <br \/>Stop-Transcript<\/p>\n<p>Tianjie (James) Wei [MSFT]   <br \/>Software Design Engineer    <br \/>Windows PowerShell Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction 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\u2019ll see that the output of ipconfig was not captured. Why is this happening? PowerShell recognizes that ipconfig is a native console application. Since many of [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3221","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>Introduction 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\u2019ll see that the output of ipconfig was not captured. Why is this happening? PowerShell recognizes that ipconfig is a native console application. Since many of [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/3221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=3221"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/3221\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=3221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=3221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=3221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}