powershell - ForEach-Object

sample

Get-Content -Encoding UTF8 ./test.txt | ForEach-Object {
    Write-Output $_
}

Get-Content -Encoding UTF8 ./test.txt | foreach {
    Write-Output $_
}

Get-Content -Encoding UTF8 ./test.txt | % {
    Write-Output $_
}

PowerShell実践ガイドブック ~クロスプラットフォーム対応の次世代シェルを徹底解説~

PowerShell実践ガイドブック ~クロスプラットフォーム対応の次世代シェルを徹底解説~