The PowerShell script “My-Script.ps1” is just an example.
The *> will direct all output, including the output generated form scripts imported or executed from the “My-Script.ps1” itself.
.\My-Script.ps1 *> log.txt
.\My-Script.ps1 *> log.txt