This is sort of a self note. This information is in many places. But I struggled to meaningfully search it despite knowing it is there.
Often, while running a command-let, we get a lot of results and it overruns the console window by a long shot. We can never go back up and take a look at the results from the beginning of the command’s execution.
In order to simultaneously log results in a text file, you can start it by:
PS F:\> Start-Transcript
Transcript started, output file is C:\Users\********\Documents\PowerShell_transcript.**********.txt
There are ways to define the output file also. You may refer to the detailed help by:
Examples of scenarios it may help are Get-SPSite | Limit All where there may be so many results that it will overrun the console window.