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

前端 未结 5 381
难免孤独
难免孤独 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:17

    The simplest workaround is to pipe the results of the native command to Out-Host

    schtasks.exe /query /S $name /fo CSV /v >$scheduledpath\$name.csv | Out-Host
    

提交回复
热议问题