0

is there a way to handle start-transcript in a background process? I have a script launched in background. almost everything works fine, except logging with start-transcript? in fact, it creates my $filelog.txt but doesn't write anything in it?

rschirin
  • 1,763
  • 10
  • 30
  • 42

1 Answers1

1

You cannot do it, non-interactive PowerShell hosts (in your case background job) don't support host output Cmdlets like Start-Transcript, Write-Host etc. You'd have to use you own logging functions or output messages to file via Out-File for example.

Josef Nemec
  • 586
  • 1
  • 5
  • 14