不乱于心,不困于情。
不畏将来,不念过往。如此,安好。

Powershell-附加历史记录Cmdlet

Cmdlet

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

在这些示例中,我们看到了正在运行的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
 
 Id CommandLine                                                                         
  -- -----------                                                                         
  13 clear-history                                                                       
  14 get-history                                                                         
  15 dir                                                                                 
  16 dir                                                                                 
  17 dir                                                                                 
  18 dir                                                                                 
  19 get-history                                                                         
  20 get-history -count 5 | Add-history                                                  
  21 dir                                                                                 
  22 dir                                                                                 
  23 dir                                                                                 
  24 get-history                                                                         
  25 get-history -count 5 | Add-history 
赞(1) 打赏
未经允许不得转载:seo优化_前端开发_渗透技术 » Powershell-附加历史记录Cmdlet

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏