Retrieving Event Logs Remotely

PowerShell v.2 has added remote capabilities to a number of cmdlets, including Get-EventLog. So now you are able to collect important events remotely with just one line:

Get-EventLog System -EntryType Warning -ComputerName PC01234

You will need to have local admin privileges on the target machine to successfully retrieve the information remotely. If you use UAC, you should make sure to run this command from an elevated PowerShell console. In addition, some remote techniques require certain prerequisites on the target machine that you want to access. For example, Get-EventLog can only retrieve the information if the target machine runs the "Remote Registry" service.

Twitter This Tip! ReTweet this Tip!


Posted Feb 05 2010, 08:00 AM by ps1

Comments

Nadir Hord wrote re: Retrieving Event Logs Remotely
on 02-28-2010 3:42 PM

get-eventlog application -computername %computer% -newest 1000 | where {$_.

eventid -eq "6"}

filter for a eventid

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.