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.