{"id":74521,"date":"2015-11-11T00:01:00","date_gmt":"2015-11-11T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2015\/11\/11\/automatically-keep-log-of-powershell-ise-commands\/"},"modified":"2019-02-18T09:34:34","modified_gmt":"2019-02-18T16:34:34","slug":"automatically-keep-log-of-powershell-ise-commands","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/automatically-keep-log-of-powershell-ise-commands\/","title":{"rendered":"Automatically Keep Log of PowerShell ISE Commands"},"content":{"rendered":"<p><b style=\"font-size:12px\">Summary<\/b><span style=\"font-size:12px\">: Ed Wilson, Microsoft Scripting Guy, talks about using the new transcript command in the Windows PowerShell ISE.<\/span><\/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\" \/>&nbsp;Hey, Scripting Guy! I might be alone in this, but I love using the transcript tool in the Windows PowerShell console. I really wish I could have a transcript in the Windows PowerShell ISE because that is what I use to write scripts. But every time I try to use it, I get a bogus error message that says basically, &quot;Go jump in a lake.&quot; How rude. I am just complaining, and I really don&rsquo;t expect that there is anything you can actually do about this sad state of affairs. Oh, yeah, for what it is worth, I love reading your blog. It is the bomb. Respectfully yours,<\/p>\n<p>&mdash;DH<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/>&nbsp;Hello DH,<\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, is here. DH, I love getting email like yours sent to my <a href=\"mailto:scripter@microsoft.com\">scripter@microsoft.com<\/a> email address. &quot;Why?&quot; you may ask. Well for one thing, I love to hear from people who read the Hey, Scripting Guy! Blog. But there is an even better reason&#8230;<\/p>\n<p>In Windows PowerShell&nbsp;5.0, we introduced the <b>Start-Transcript<\/b> cmdlet to the Windows PowerShell ISE. Yes, that is right. You were not the only one who complained about not having a transcript tool in the Windows PowerShell ISE. As a matter of fact, I even wrote one myself that I used for many years. But that is no longer necessary because WooHoo, <b>Start-Transcript<\/b> now works in the ISE.<\/p>\n<h2>The transcript tool in the PowerShell ISE<\/h2>\n<p>Like in the Windows PowerShell console, I can use the <b>Start-Transcript<\/b> cmdlet to start a transcript of what happens in the Windows PowerShell ISE. All I need to do is to type <b>Start-Transcript<\/b>. However, I like to capture the output of the command. This is because the transcript gets basically hidden. Well, not actually hidden, it goes into the Documents folder in my profile location. It also has a long random&mdash;a very long random&mdash;file name. Actually, it is a random number and letter combination, and then the date, time, and seconds. Still, it is rather painful to navigate. The command and its output are shown here:<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; Start-Transcript<\/p>\n<p style=\"margin-left:30px\">Transcript started, output file is C:\\Users\\mredw\\Documents\\PowerShell_transcript.ED<\/p>\n<p style=\"margin-left:30px\">LT.EW1t8ikl.20151106110936.txt<\/p>\n<p>When I am done, I can type <b>Stop-Transcript<\/b>. If I do, it will nicely display the location of the transcript:<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; Stop-Transcript<\/p>\n<p>Transcript stopped, output file is C:\\Users\\mredw\\Documents\\PowerShell_transcript.ED<\/p>\n<p style=\"margin-left:30px\">LT.EW1t8ikl.20151106110936.txt<\/p>\n<p>If I close the Windows PowerShell ISE while the transcript is running, it automatically stops the transcription and I need to use <b>Start-Transcript<\/b> to start it again.<\/p>\n<p>Unfortunately, as you can see here, the <b>Start-Transcript<\/b> and <b>Stop-Transcript<\/b> cmdlets return a string:<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; Start-Transcript | gm<\/p>\n<p style=\"margin-left:30px\"><span style=\"font-size:12px\">&nbsp; &nbsp;TypeName: System.String<\/span><\/p>\n<p style=\"margin-left:30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MemberType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Definition&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">&#8212;- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8212;&#8212;&#8212;- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8212;&#8212;&#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">Clone&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.Object Clone(), System.Object IClon&#8230;<\/p>\n<p style=\"margin-left:30px\">CompareTo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int CompareTo(System.Object value), int Co&#8230;<\/p>\n<p style=\"margin-left:30px\">Contains&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool Contains(string value)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">CopyTo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void CopyTo(int sourceIndex, char[] destin&#8230;<\/p>\n<p style=\"margin-left:30px\">EndsWith&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool EndsWith(string value), bool EndsWith&#8230;<\/p>\n<p style=\"margin-left:30px\">Equals&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool Equals(System.Object obj), bool Equal&#8230;<\/p>\n<p style=\"margin-left:30px\">GetEnumerator&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.CharEnumerator GetEnumerator(), Sys&#8230;<\/p>\n<p style=\"margin-left:30px\">GetHashCode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int GetHashCode()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">GetType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type GetType()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">GetTypeCode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.TypeCode GetTypeCode(), System.Type&#8230;<\/p>\n<p style=\"margin-left:30px\">IndexOf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int IndexOf(char value), int IndexOf(char &#8230;<\/p>\n<p style=\"margin-left:30px\">IndexOfAny&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int IndexOfAny(char[] anyOf), int IndexOfA&#8230;<\/p>\n<p style=\"margin-left:30px\">Insert&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string Insert(int startIndex, string value)&nbsp;<\/p>\n<p style=\"margin-left:30px\">IsNormalized&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool IsNormalized(), bool IsNormalized(Sys&#8230;<\/p>\n<p style=\"margin-left:30px\">LastIndexOf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int LastIndexOf(char value), int LastIndex&#8230;<\/p>\n<p style=\"margin-left:30px\">LastIndexOfAny&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int LastIndexOfAny(char[] anyOf), int Last&#8230;<\/p>\n<p style=\"margin-left:30px\">Normalize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string Normalize(), string Normalize(Syste&#8230;<\/p>\n<p style=\"margin-left:30px\">PadLeft&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string PadLeft(int totalWidth), string Pad&#8230;<\/p>\n<p style=\"margin-left:30px\">PadRight&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string PadRight(int totalWidth), string Pa&#8230;<\/p>\n<p style=\"margin-left:30px\">Remove&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string Remove(int startIndex, int count), &#8230;<\/p>\n<p style=\"margin-left:30px\">Replace&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string Replace(char oldChar, char newChar)&#8230;<\/p>\n<p style=\"margin-left:30px\">Split&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string[] Split(Params char[] separator), s&#8230;<\/p>\n<p style=\"margin-left:30px\">StartsWith&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool StartsWith(string value), bool Starts&#8230;<\/p>\n<p style=\"margin-left:30px\">Substring&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string Substring(int startIndex), string S&#8230;<\/p>\n<p style=\"margin-left:30px\">ToBoolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool IConvertible.ToBoolean(System.IFormat&#8230;<\/p>\n<p style=\"margin-left:30px\">ToByte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; byte IConvertible.ToByte(System.IFormatPro&#8230;<\/p>\n<p style=\"margin-left:30px\">ToChar&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char IConvertible.ToChar(System.IFormatPro&#8230;<\/p>\n<p style=\"margin-left:30px\">ToCharArray&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char[] ToCharArray(), char[] ToCharArray(i&#8230;<\/p>\n<p style=\"margin-left:30px\">ToDateTime&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; datetime IConvertible.ToDateTime(System.IF&#8230;<\/p>\n<p style=\"margin-left:30px\">ToDecimal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; decimal IConvertible.ToDecimal(System.IFor&#8230;<\/p>\n<p style=\"margin-left:30px\">ToDouble&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double IConvertible.ToDouble(System.IForma&#8230;<\/p>\n<p style=\"margin-left:30px\">ToInt16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int16 IConvertible.ToInt16(System.IFormatP&#8230;<\/p>\n<p style=\"margin-left:30px\">ToInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int IConvertible.ToInt32(System.IFormatPro&#8230;<\/p>\n<p style=\"margin-left:30px\">ToInt64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; long IConvertible.ToInt64(System.IFormatPr&#8230;<\/p>\n<p style=\"margin-left:30px\">ToLower&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string ToLower(), string ToLower(culturein&#8230;<\/p>\n<p style=\"margin-left:30px\">ToLowerInvariant Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string ToLowerInvariant()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">ToSByte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sbyte IConvertible.ToSByte(System.IFormatP&#8230;<\/p>\n<p style=\"margin-left:30px\">ToSingle&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; float IConvertible.ToSingle(System.IFormat&#8230;<\/p>\n<p style=\"margin-left:30px\">ToString&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string ToString(), string ToString(System&#8230;.<\/p>\n<p style=\"margin-left:30px\">ToType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.Object IConvertible.ToType(type con&#8230;<\/p>\n<p style=\"margin-left:30px\">ToUInt16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uint16 IConvertible.ToUInt16(System.IForma&#8230;<\/p>\n<p style=\"margin-left:30px\">ToUInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uint32 IConvertible.ToUInt32(System.IForma&#8230;<\/p>\n<p style=\"margin-left:30px\">ToUInt64&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uint64 IConvertible.ToUInt64(System.IForma&#8230;<\/p>\n<p style=\"margin-left:30px\">ToUpper&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string ToUpper(), string ToUpper(culturein&#8230;<\/p>\n<p style=\"margin-left:30px\">ToUpperInvariant Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string ToUpperInvariant()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">Trim&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string Trim(Params char[] trimChars), stri&#8230;<\/p>\n<p style=\"margin-left:30px\">TrimEnd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string TrimEnd(Params char[] trimChars)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">TrimStart&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string TrimStart(Params char[] trimChars)&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">Path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NoteProperty&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string Path=C:\\Users\\mredw\\Documents\\Power&#8230;<\/p>\n<p style=\"margin-left:30px\">Chars&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ParameterizedProperty char Chars(int index) {get;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p style=\"margin-left:30px\">Length&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Property&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int Length {get;} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/p>\n<p>This means that I cannot pipe <b>Stop-Transcript<\/b> to Notepad to automatically display the transcript log. In the past, I wrote a function that would parse the string and return the path to the transcript log. I could then use that with Notepad to display the transcript. Now, however, I do not need to do that. I can instead use the <b>ConvertFrom-String<\/b> cmdlet.<\/p>\n<p>Here is an example&#8230;<\/p>\n<p>First I capture the returned string from <b>Start-Transcript<\/b> into a variable. I then use <b>ConvertFrom-String<\/b> to parse the string. The data I want is the path to the transcript log, and it appears in property P6. This is shown here:<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; $a = Start-Transcript<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; $a | ConvertFrom-String<\/p>\n<p style=\"margin-left:30px\">P1 : Transcript<\/p>\n<p style=\"margin-left:30px\">P2 : started,<\/p>\n<p style=\"margin-left:30px\">P3 : output<\/p>\n<p style=\"margin-left:30px\">P4 : file<\/p>\n<p style=\"margin-left:30px\">P5 : is<\/p>\n<p style=\"margin-left:30px\">P6 : C:\\Users\\mredw\\Documents\\PowerShell_transcript.EDLT.6tTqSZcx.20151106111543.txt<\/p>\n<p>After I do some work, and then stop the transcript, I can examine the log. In the following code, I stop the transcript, and then access the transcript log to display it in Notepad.<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; Stop-Transcript<\/p>\n<p style=\"margin-left:30px\">Transcript stopped, output file is C:\\Users\\mredw\\Documents\\PowerShell_transcript.ED<\/p>\n<p style=\"margin-left:30px\">LT.6tTqSZcx.20151106111543.txt<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; ($a | ConvertFrom-String).p6<\/p>\n<p style=\"margin-left:30px\">C:\\Users\\mredw\\Documents\\PowerShell_transcript.EDLT.6tTqSZcx.20151106111543.txt<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; notepad ($a | ConvertFrom-String).p6<\/p>\n<p>The log is shown in the following image:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-11-15-01.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-11-11-15-01.png\" alt=\"Image of log\" title=\"Image of log\" \/><\/a><\/p>\n<p>As you can see, the log contains a lot of default information that could be useful in troubleshooting. It shows the user name, the computer name, and version of the operating system. It lists the host application and the process ID and the versions of WSMan, Windows PowerShell, the CLR, and other pertinent information. It also shows the command I typed and the command to stop the transcript. In addition, it shows when the transcript was started. It does not, however, show when each command ran or when the transcript stopped. One solution to this issue is to modify the prompt with a time stamp.<\/p>\n<p>Other than that, the transcript works well. So, DH, there is good news after all. All you need is Windows PowerShell&nbsp;5.0.<\/p>\n<p>Now you understand a bit about using the Windows PowerShell ISE transcript tool.&nbsp; Join me tomorrow when I will talk about more cool stuff.<\/p>\n<p>I invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"mailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><b>Ed Wilson, Microsoft Scripting Guy<\/b><span style=\"font-size:12px\">&nbsp;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Ed Wilson, Microsoft Scripting Guy, talks about using the new transcript command in the Windows PowerShell ISE. &nbsp;Hey, Scripting Guy! I might be alone in this, but I love using the transcript tool in the Windows PowerShell console. I really wish I could have a transcript in the Windows PowerShell ISE because that is [&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":[553,609,590,3,45],"class_list":["post-74521","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-ise","tag-powershell-5","tag-scripting","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Ed Wilson, Microsoft Scripting Guy, talks about using the new transcript command in the Windows PowerShell ISE. &nbsp;Hey, Scripting Guy! I might be alone in this, but I love using the transcript tool in the Windows PowerShell console. I really wish I could have a transcript in the Windows PowerShell ISE because that is [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/74521","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=74521"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/74521\/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=74521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=74521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=74521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}