When using PowerShell Get-WinEvent cmdlet you receive the error "Get-WinEvent : The specified resource type cannot be found in the image file"

When using PowerShell Get-WinEvent cmdlet you receive the error "Get-WinEvent : The specified resource type cannot be found in the image file"


This error isn't actually caused by the cmdlet, but occurs when the event log cannot resolve the text for the error.


The error can be safely ignored

Get-WinEvent -MaxEvents 1 -FilterHashTable @{ LogName = "System"; ID = 1001 } -ErrorAction SilentlyContinue



The message is then returned as Cannot retrieve event message text however the rest of the properties are available.



Comments

Popular posts from this blog

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

TFTPD32 or TFTPD64 reports Bind error 10013 An attempt was made to access a socket in a way forbidden by its access permissions.

Enable function lock for F1-F12 on HP ZBook mobile workstations