Start-transcript in a background process

前端 未结 1 1832
忘掉有多难
忘掉有多难 2021-01-28 03:31

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

1条回答
  •  走了就别回头了
    2021-01-28 04:08

    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.

    0 讨论(0)
提交回复
热议问题