2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

自分用のスクリプトチートシート

2
Last updated at Posted at 2026-01-28

batの管理者権限自動再実行

:: 管理者権限チェック
net session >nul 2>&1
if %errorlevel% neq 0 (
    echo 管理者権限で再実行します...
    powershell -Command "Start-Process '%~f0' -Verb RunAs"
    exit /b
)

batで同じファイル名のPowerShellの実行

hoge.bat
hoge.ps1

@echo off
powershell -ExecutionPolicy RemoteSigned -File "%~dp0%~n0.ps1"
pause

Power Automate における改行の扱い方

表現 文字コード UriComponent Power Automateでの扱い方
CR 0x0d %0D decodeUriComponent('%0D')
LF 0x0a %0A decodeUriComponent('%0A')

Formsで取得した改行を含む文章をメール送信しても改行はFormsの入力通り反映されないため、改行コードを<br>に置き換える必要があるが\nを置換すればいいわけではない。

例
replace(replace(text,decodeUriComponent('%0D'),'<br>'),decodeUriComponent('%0A'),'<br>')
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?