{"id":5096,"date":"2012-08-21T11:59:00","date_gmt":"2012-08-21T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2012\/08\/21\/powertip-create-a-record-of-your-powershell-commands\/"},"modified":"2012-08-21T11:59:00","modified_gmt":"2012-08-21T11:59:00","slug":"powertip-create-a-record-of-your-powershell-commands","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-create-a-record-of-your-powershell-commands\/","title":{"rendered":"PowerTip: Create a Record of Your PowerShell Commands"},"content":{"rendered":"<p><b>Summary<\/b>: Use&nbsp;<b>Start-Transcript<\/b>&nbsp;to create a record of Windows PowerShell commands.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\" \/>How can I create an audit file of all commands that I typed during a Windows PowerShell session?&nbsp;<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/>Use the&nbsp;<b>Start-Transcript<\/b>&nbsp;command:<\/p>\n<p style=\"padding-left: 60px\">Start-transcript<\/p>\n<p style=\"padding-left: 60px\">\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\" \/>How can I provide a custom name and location for my Windows PowerShell transcript?&nbsp;<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/>Use the&nbsp;<b>Start-Transcript<\/b>&nbsp;command with the <strong>P<\/strong><b>ath<\/b><i>&nbsp;<\/i>parameter:<\/p>\n<p style=\"padding-left: 60px\">Start-transcript -Path c:\\fso\\mytranscript.txt<\/p>\n<p style=\"padding-left: 60px\">\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\" \/>How can I stop a transcript after I have started it?<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/>Use the&nbsp;<b>Stop-Transcript<\/b>&nbsp;command:<\/p>\n<p style=\"padding-left: 60px\">Stop-transcript<\/p>\n<p align=\"left\">&nbsp;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7610.Dr.ScriptoForTips.jpg\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7610.Dr.ScriptoForTips.jpg\" border=\"0\" alt=\"\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Use&nbsp;Start-Transcript&nbsp;to create a record of Windows PowerShell commands. How can I create an audit file of all commands that I typed during a Windows PowerShell session?&nbsp; Use the&nbsp;Start-Transcript&nbsp;command: Start-transcript How can I provide a custom name and location for my Windows PowerShell transcript?&nbsp; Use the&nbsp;Start-Transcript&nbsp;command with the Path&nbsp;parameter: Start-transcript -Path c:\\fso\\mytranscript.txt How can I [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[356,3,45],"class_list":["post-5096","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-powertip","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Use&nbsp;Start-Transcript&nbsp;to create a record of Windows PowerShell commands. How can I create an audit file of all commands that I typed during a Windows PowerShell session?&nbsp; Use the&nbsp;Start-Transcript&nbsp;command: Start-transcript How can I provide a custom name and location for my Windows PowerShell transcript?&nbsp; Use the&nbsp;Start-Transcript&nbsp;command with the Path&nbsp;parameter: Start-transcript -Path c:\\fso\\mytranscript.txt How can I [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/5096","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=5096"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/5096\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=5096"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=5096"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=5096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}