Start- and stop-Transcript works great, but as a personal preference, (this is just personal preference), I prefer to 'know exactly where the log file will be, and what it will be called'.
With that in mind, in the script within this: https://tcsmug.org/blogs/sherry-kissinger/568-cm-all-members-of-all-local-groups-powershell is an example of writing a log file, in cmtrace format, to a specific folder and logfile name of your choice; the example(s) with the script is either to %temp%, or "wherever the CM client drops it's logs".