Mark Minasi's Reader Forum
Mark Minasi's Reader Forum
Home | Profile | Register | Active Topics | Active Polls | Members | Search | FAQ | Minasi Forum RSS Feed
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 HALP! Questions on Windows and Windows Server
 PowerShell
 Issue with Get-Eventlog
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

glenn_faustino
Old Timer

Philippines
435 Posts
Status: offline

Posted - 12/22/2011 :  03:33:42 AM  Show Profile  Reply with Quote

Hi,

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?

Thanks in advance.

Glenn

jhicks
Here To Stay

USA
283 Posts
Status: offline

Posted - 12/22/2011 :  07:23:52 AM  Show Profile  Visit jhicks's Homepage  Reply with Quote
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.

Jeffery Hicks
Windows PowerShell MVP

http://jdhitsolutions.com.blog
http://twitter.com/JeffHicks
http://www.ScriptingGeek.com
Now Available: Managing Active Directory with Windows PowerShell: TFM 2nd ed.
Go to Top of Page

glenn_faustino
Old Timer

Philippines
435 Posts
Status: offline

Posted - 12/22/2011 :  09:56:12 AM  Show Profile  Reply with Quote

Hi Jeff,

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.

Thanks for the quick response.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Mark Minasi's Reader Forum © 2002-2011 Mark Minasi Go To Top Of Page
This page was generated in 0.08 seconds. Snitz Forums 2000