2020-02-06から1日間の記事一覧

powershell - Join-Path(複数のパスを結合)

sample #複数のパス結合 $path = Join-Path "aaa" "bbb" | Join-Path -ChildPath "ccc" | Join-Path -ChildPath "test.txt" Write-Output $path PS > aaa\bbb\ccc\test.txt PowerShell実践ガイドブック ~クロスプラットフォーム対応の次世代シェルを徹底解説…

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実践ガイドブック …