Logging with Start-Transcript

Source: Reference Link