powershell でutf8とShift_JIS(SJIS、UTF8)の文字コードを相互に変換

バッチファイルpowershell -command "Get-Content -Encoding Shift-JIS y:/wordlst.txt | Out-File y:/word.txt -Encoding utf8&qu ...
自分自身のパソコンの IP アドレスを取得し バッチファイルで使用する

バッチファイルFOR/F "usebackq" %%a IN (`powershell -command " $contents = ( Get-NetIPAddress | Where-Object -Fil ...
バッチファイルとパワーシェルでテキストやテキストファイルを暗号化して復号化する

バッチファイルpowershell Set-Clipboard -Value "This"powershell Set-Content -Path .\DateTime.txt -Value (Get-Date)time ...
バッチファイルの中でファイルダイアログや フォルダーダイアログや メッセージボックスを表示してファイル名などの戻り値をバッチファイルの変数に連携する方法

Vbスクリプトを使用せずパワーシェルで行う方法です
ファイルダイアログFOR/F "usebackq" %%a IN (`powershell -command "Add-Type -assembl ...バッチファイルの中でPowershellスクリプトから値を取得する方法

コードFOR/F "usebackq" %%a IN (`powershell -command " $contents = (Get-Content ./c_up_parab.txt ); return $c ...
Windows のtimeoutコマンドを使って何がキーを押した時もしくは時間切れの場合に条件によって違うコマンドを実行する方法

choiceコマンドを使って条件分岐でコマンドを実行できますが毎回の答えは大変です
バッチファイル何かキーボードをしたらコマンドプロント 時間切れだとノートパッドを起動します
::powershell -Execut ...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); ...