取得事件日誌問題

取得事件日誌問題

我想快速報告我在伺服器上看到的一些日誌條目,所以我運行了:

Get-Eventlog -logname system -newest 10 -computer fs1 | fl

我收到了事件訊息,但描述全錯了。這是一個例子:

索引:1260055 條目類型:警告 InstanceId:2186936367 訊息:無法找到來源「W32Time」中事件 ID「-2108030929」的描述。本機可能沒有顯示訊息所需的註冊表資訊或訊息 DLL 文件,或者您可能沒有存取它們的權限。以下資訊是該活動的一部分:'時間。 windows.com,0x1' 類別:(0) 類別編號:0 取代字串:{time.windows.com,0x1} 來源:W32Time 產生時間:1/25/2010 10:43:31 AM 時間寫入:1 /25/2010 10: 43:31 AM 使用者名稱:

請注意,如果我提取事件 ID 屬性,它是正確的(在本例中為 38)

這是已知問題還是有問題。透過本機和遠端事件檢視器可以很好地解析訊息

這是 powershell 版本資訊:

Name             : ConsoleHost
Version          : 2.0
InstanceId       : bc58fcf8-bba3-4ca8-8972-17dbd5d9ff08
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

以下是修改後的版本資訊:

Name                           Value
----                           -----
CLRVersion                     2.0.50727.3603
BuildVersion                   6.0.6002.18111
PSVersion                      2.0
WSManStackVersion              2.0
PSCompatibleVersions           {1.0, 2.0}
SerializationVersion           1.1.0.1
PSRemotingProtocolVersion      2.1

答案1

這是 PowerShell 測試版中的已知問題。您使用哪個版本?

相關內容