PowerShell historyで履歴を確認する

環境
PowerShell 5.1.22621.963
Windows 10 Pro 64bit

操作方法
get-history
powershellで実行したコマンドのhistory(履歴)は、上記のコマンドで確認します。

実行結果

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
PS C:\> get-history
Id CommandLine
-- -----------
1 cd /;dir
2 cd /;dir
3 cd /;dir;clear
PS C:\> get-history Id CommandLine -- ----------- 1 cd /;dir 2 cd /;dir 3 cd /;dir;clear
PS C:\> get-history

  Id CommandLine
  -- -----------
   1 cd /;dir
   2  cd /;dir
   3 cd /;dir;clear

 

PowerShell

Posted by arkgame