Powershell-Add-History Cmdlet

示例

在本例中,我们将再次将前五个历史命令添加到当前历史记录中。

> get-history
 Id CommandLine                                                                         
  -- -----------                                                                         
  13 clear-history                                                                       
  14 get-history                                                                         
  15 dir                                                                                 
  16 dir                                                                                 
  17 dir                                                                                 
  18 dir                                                                                 

> Get-history -count 5 | Add-history

现在再次获取历史记录以查看添加历史记录的效果。

> Get-history

Cmdlet

Add-History cmdlet用于在当前历史记录中添加命令。

日期:2019-08-20 13:51:10 来源:oir作者:oir