start-Transcript not capturing all output to log file..?

前端 未结 5 388
难免孤独
难免孤独 2020-12-11 00:15

I have the below code that goes through and gets scheduled tasks info and puts the output that occurs on the screen to a log file.

However, what I have noticed is t

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-11 01:05

    None of the above worked for me. I found a link from 2009 with discussions of the issue. But a microsoft blog from 2010 solved the issue for me.

    In short, pipe the native command output to Out-Default.

      schtasks.exe /query /S $name /fo CSV /v | Out-Default
    

    {I didn't really try that line myself, but you get the idea.}

提交回复
热议问题