これまではエラーまでしかリダイレクトできなかったのがWarningとかも可能になったようです。
| function Write-Message { "Normal Infomation" #1 Write-Error "Error Infomation" #2 Write-Warning "Warning Infomation" #3 Write-Verbose "Verbose Infomation" -Verbose #4 Write-Debug "Debug Infomation" -Debug #5 } Write-Message *> a.txt notepad a.txt |

単独でリダイレクト、全部をリダイレクトはこれで良いのですが、何かと何かを合わせてリダイレクトはどうするんですかね。
| Write-Message 3>&1> a.txt |
こんな感じですかね。
0 件のコメント:
コメントを投稿