适用于所有PowerShell版本
要保存你在当前PowerShell控制台上输入的所有的PowerShell命令,试试下面的代码:
(Get-History).CommandLine | clip.exe
它会复制所有的命令道剪贴板,然后你可以把它复制进PowerShell ISE,再保存。
原文链接:Copying Command Line History
本文链接: https://www.pstips.net/copying-command-line-history.html
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!