PowerShell - Get-History Cmdlet



Cmdlet

Get-History cmdlet 用於獲取在當前會話中執行的命令。

在此示例中,我們將看到 Get-History cmdlet 的實際應用。

示例

在此示例中,我們將獲取在當前歷史記錄中執行的命令。

> get-history
  Id CommandLine                                                                         
  -- -----------                                                                         
  13 clear-history                                                                       
  14 get-history                                                                         
  15 dir                                                                                 
  16 dir                                                                                 
  17 dir                                                                                 
  18 dir                                                                                 
powershell_advanced_cmdlets.htm
廣告
© . All rights reserved.