PowerShell pipeline 管道

搜索以下的关键词,即可查看微软文档的文章。

powershell about_Pipelines

powershell about_Pipeline_Chain_Operators

PowerShell 支持使用管道操作。

一个是管道操作符,|

1
Get-ChildItem | Where-Object { $_.Length -gt 1MB }

一个是管道链运算符。使用&&||运算符来连接管道。

1
Write-Output 'First' && Write-Output 'Second'

大致如此。


PowerShell pipeline 管道
https://sunboyallen.github.io/powershell-pipeline/
作者
sunboyallen
发布于
2024年1月9日
许可协议