2017-02-22 63 views
-3

例如,如果我想在特定的日期和時間之前檢索eventlog。在Powershell中,如何輸入<datetime>?

Get-EventLog system -Before (what do I enter here?) 

從本質上講,輸入日期時間的格式究竟是什麼?

+1

要求之前,請嘗試谷歌的一個例子。 「Powershell日期時間」。第一個結果:https://technet.microsoft.com/en-us/library/ff730960.aspx –

+0

'幫助Get-EventLog -full' –

+0

我沒有把日期放在引號中是原因。抱歉。 – jdsr4c

回答

1

試試這樣說:

Get-EventLog System -Before "2/22/2017 7:00am"