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

SOLVED: Exchange Online Management PowerShell Connect-ExchangeOnline bug "A window handle must be configured. See https://aka.ms/msal-net-wam#parent-window-handles"

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

get-windowsfeature : The given key was not present in the dictionary