Start-Transcript and Powershell Logging RRS feed

  • Question

  • Hi Everyone,

    I've been tasked to enable logging as max as possible in the powershell scripts I write for Remoting and sometimes for many users at once.

    We want to log everything which a powershell script is doing with the exact time it is done.

    > Any urls that can help me learn specifically more on logging everything that my powershell script does ?

    > Start-Transcript when run directly from a powershell captures the output + the actual command as well in the notepad. However when run as a ps1 script, it does not capture the actual command which was run but only the output and errors, is this by design?

    >I have been using measure-command and a few functions to capture how much time my scripts take to re-write a better code, any urls to learn optimizing the scripts and to be able to measure them in terms of speed, performance and execution etc ?


    • Moved by Bill_Stewart Tuesday, December 11, 2018 10:22 PM This is not "scripts on demand"
    Thursday, August 2, 2018 1:18 PM

All replies