I am creating a powershell script as a background job using start-job which then logs it\'s output using start-transcript. Below is the code of both:
a
Apparently Start-Transcript isn't supported in background jobs. If you do a Receive-Job to look at the script output you're likely to see an error like this:
This host does not support transcription.
+ CategoryInfo : NotImplemented: (:) [Start-Transcript], PSNotSupportedException
+ FullyQualifiedErrorId : NotSupported,Microsoft.PowerShell.Commands.StartTranscriptCommand
BTW in PowerShell 2.0 I recommend you switch from Set-PSDebug -strict to Set-StrictMode -Version 2.0 - it will catch more potential errors.