この記事を作った動機
普段 linux 環境を使っているので、Windows の PowerShell コマンドとか、コマンドプロンプトに疎く、忘れることがあるので、記録を取ってみるところ。
which 相当
Get-command taskmgr
CommandType Name Version Source
----------- ---- ------- ------
Application Taskmgr.exe 10.0.2262… C:\WINDOWS\system32\Taskmgr.exe
pkill 相当
taskkill /F /IM main.exe
成功: プロセス "main.exe" (PID 10832) は強制終了されました。
gdisk や fdisk 相当
diskpart
Microsoft DiskPart バージョン 10.0.22621.1
Copyright (C) Microsoft Corporation.
コンピューター: HOSTNAME
DISKPART> list disk
ディスク 状態 サイズ 空き ダイナ GPT
### ミック
------------ ------------- ------- ------- --- ---
ディスク 0 オンライン 931 GB 2048 KB *
DISKPART> sel disk 0
ディスク 0 が選択されました。
DISKPART> list part
Partition ### Type Size Offset
------------- ------------------ ------- -------
Partition 1 システム 100 MB 1024 KB
Partition 2 予約済み 16 MB 101 MB
Partition 3 プライマリ 929 GB 117 MB
Partition 4 回復 872 MB 929 GB
Partition 5 回復 900 MB 930 GB
DISKPART>
参考にしたサイトとか
- taskkill | Microsoft Learn
https://learn.microsoft.com/ja-jp/windows-server/administration/windows-commands/taskkill (2025年4月9日) - diskpart | Microsoft Learn
https://learn.microsoft.com/ja-jp/windows-server/administration/windows-commands/diskpart (2025年4月9日) - windows - Equivalent of cmd’s “where” in powershell - Super User
https://superuser.com/questions/675837/equivalent-of-cmds-where-in-powershell (2025年4月9日)