Windows PowerShell - 如何查看命令历史日期/时间

Ram*_*min 6 windows powershell windows-command-prompt command

我想列出在 Windows PowerShell 中输入的命令及其各自的时间戳。我怎样才能用Get-History命令做到这一点?

小智 10

get-history |fl 
Run Code Online (Sandbox Code Playgroud)

为您提供命令行和执行的开始/结束时间。但这只是向您显示在此特定 powershell 会话中输入的命令的历史记录,似乎没有保留历史记录。因此,如果您重新启动计算机,我不希望 get-history 有很多有用的输出

我不确定您使用什么方法来访问这些 URL,但除非在该方法中有一些额外的日志记录,否则我认为您不会找到历史记录。