I've tried querying the eventlog on a remote computer uing the command below:
Get-EventLog system -Source 'windows update agent' -newest 50 -computername server1 | where {$_.eventid -eq '19'} | select -first 1
But the message property displayed are not the same when I query the server locally.
Here's the message property displayed when querying the server remotely:
Message : The description for Event ID '19' in Source 'Windows Update Agent' cannot be found. The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them. The following information is part of the event:'Security Update for Windows Server 2003 x64 Edition (KB2564958)'
Here's the message property displayed when I query the server locally:
Message : Installation Successful: Windows successfully installed the following update: Security Update for Windows Server 2003x64 Edition (KB2564958)
I'm not sure if this is a bug on get-eventlog cmdlet but is there anyway to get around this problem?
Do you see the same message if you use the Event log management console and look at the remote error? I'm betting you will. Your other option is to run get-eventlog "locally" using PowerShell remoting either in a PSSession or with Invoke-Command.
When I open the MMC I don't see the same message I can see the same output when I run the command locally. Yes, I'm thinking that remoting and invoke-command will be the workaround for this but on the environment I'm working powershell remoting is not yet enabled.