
我正在嘗試讀取 wusa 生成的 evtx 事件文件,但 Get-WinEvent 只是拋出錯誤。
PS> Get-WinEvent -path .\install.evtx
Get-WinEvent : The request is not supported
At line:1 char:1
+ Get-WinEvent -path .\install.evtx
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-WinEvent], EventLogException
+ FullyQualifiedErrorId : System.Diagnostics.Eventing.Reader.EventLogException,Microsoft.PowerShell.Commands.GetWi
nEventCommand
該檔案在事件檢視器中可以正常開啟。
我唯一的假設是我沒有安裝正確的提供者。
這是我正在使用的powershell版本
Name Value
---- -----
PSVersion 5.1.17134.165
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.165
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
這些是我擁有的唯一與 Microsoft.Powershell 相符的模組。
Microsoft.PowerShell.Management Microsoft.PowerShell.PSReadLine Microsoft.PowerShell.Utility
有人能幫忙解決這個問題嗎?