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,939
  • 10
  • 34
  • 44

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
  • 672
  • 1
  • 6
  • 16