Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ユーザー SID をレジストリ (または何でも) からコピーして、コマンド ラインのみを使用して txt ファイルに貼り付けることはできますか (Windows 7)?
WMIC経由
wmic useraccount where name='%username%' get sid | findstr /b /C:"S-1" > file.txt
WHOAMI 経由 (バッチ ファイルで使用されている場合はパーセント記号が重複しています)
for /F "tokens=2 delims=," %f in ('whoami /user /FO CSV /NH') do echo %~f > file.txt