PowerShellでBOM無しUTF8を簡単に出力する方法

通常では bomがついて 出力されてしまいます
バージョンの確認$PSVersionTable新しいバージョンのパワーシェルPowerShellをインストールReleases · PowerShell/PowerShell ...
パワーシェルでテキストファイルを読んで文字列を置換するLinux の SED

バッチファイルpowershell -command "(Get-Content .\hello.txt) | %%{ $_ -replace 'hello','konbanwa'} | set-c ...
PowerShell を使ってテキストファイルの先頭や末尾の行や途中の行を表示する方法Linux のHead Tail

バッチファイルpowershell -command "Get-Content output1.txt -Head 2 | Out-Host"powershell -command "Get-Content o ...
パワーシェルでテキストファイルを読んで指定した行数ごとにファイルを分割して 出力するLinux のsplit

バッチファイルpowershell -command "$i=1;$inputF ='output1.txt';$baseName = ::GetFileNameWithoutExtension($inputF); ...
パワーシェルでテキストファイルを読んで指定した行数ごとに横に並べて CSV 出力する

バッチファイルpowershell -command "Get-Content output1.txt -ReadCount 2 | %%{$_ -join ','} | Out-Host"aqbkcma ...
linux paste コマンドのようにパワーシェルPowerShell でテキストファイルを横方向に結合する

Windows パソコンでペーストコマンドと同じようなことをします
バッチファイルpowershell -command "Get-Content output1.txt , output2.txt | Group-O ...CSV ファイルを読んで キー項目が変わったら 改行するバッチファイル

バッチファイル
1列目はそのまま1列目に表示し2列目を横に並べます
@echo offsetlocal enableDelayedExpansion:: ファイル名を指定set inputFile="ticker\tic ...PowerShell を使用して、タブ形式のデータを CSV 形式に変換するバッチファイル

バッチファイルpowershell -Command "Get-Content -Path 'output3.txt' -Encoding Default | ConvertFrom-Csv -Delimiter ...
CSV ファイルやタブ区切りのテキストファイルを読んで項目を加工しながら出力するバッチファイル

項目を分解したり 指定した文字列を削除したり 新しい項目を追加したり 並び替えたり 項目を並び替えたりします
バッチファイルで今日の日付の項目を追加しています
数字部分のカンマを削除しています。
タ ...
クリップボードの内容をテキストファイルにしたりテキストファイルの内容をクリップボードにコピーするバッチファイル

クリップボードの内容をテキストファイルにするpowershell -command "get-clipboard">225.txtテキストファイルの内容をクリップボードにコピーclip < file.txtp ...