Linuxのscriptコマンド的なものがPowershellにもあるんだね。
ログ取りスタート
$time = Get-Date -Format "yyyyMMdd-HHmm" Start-Transcript -Path "C:\Users\yuta\$time.log"
ログ取り終了
Stop-Transcript

取得したログはこんな感じに

Linuxのscriptコマンド的なものがPowershellにもあるんだね。
ログ取りスタート
$time = Get-Date -Format "yyyyMMdd-HHmm" Start-Transcript -Path "C:\Users\yuta\$time.log"
ログ取り終了
Stop-Transcript

取得したログはこんな感じに
