![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #2 (permalink) |
| Guest | Re: Get-eventlog You can use System.Diagnostics.EventLog http://msdn2.microsoft.com/en-us/lib...og(VS.71).aspx Example: $log = "Application" $server = "server1" $evtlog = New-Object System.Diagnostics.Eventlog($log,$server) $evtlog.Entries | select -first 10 "Guy Thomas" <guy@computerperformance.co.uk> wrote in message news:uPHIT%23dqHHA.4768@TK2MSFTNGP02.phx.gbl... >I have checked help get-eventlog, and can find no reference to a -computer >or -computerName parameter. > > Question: > Is there any way that PowerShell can interrogate the Eventlogs on another > machine? > > Guy > |
| | #3 (permalink) |
| Guest | Re: Get-eventlog I also did a search using: http://bsonposh.com/modules/wordpress/?page_id=13 (Google Blog Search I created) Found some WMI examples as well: http://blog.sapien.com/current/2006/...filtering.html http://thepowershellguy.com/blogs/po...fic-words.aspx There are numerous others as well. "Guy Thomas" <guy@computerperformance.co.uk> wrote in message news:uPHIT%23dqHHA.4768@TK2MSFTNGP02.phx.gbl... >I have checked help get-eventlog, and can find no reference to a -computer >or -computerName parameter. > > Question: > Is there any way that PowerShell can interrogate the Eventlogs on another > machine? > > Guy > |
| | #4 (permalink) |
| Guest | Re: Get-eventlog Fantastic! Another magic scripting moment - Thank you Brandon. This is the example that I am modifying for my needs. http://blog.sapien.com/current/2006/...filtering.html I keep forgetting about the Select .. -query constructions. What I never forget is the gulf between my clunky amateur efforts and the elegance and efficiency of what you Professionals can achieve. Guy "Brandon Shell" <tshell.mask@gmail.com> wrote in message news:enQqvzeqHHA.3228@TK2MSFTNGP03.phx.gbl... >I also did a search using: >http://bsonposh.com/modules/wordpress/?page_id=13 (Google Blog Search I >created) > > Found some WMI examples as well: > http://blog.sapien.com/current/2006/...filtering.html > http://thepowershellguy.com/blogs/po...fic-words.aspx > > There are numerous others as well. > > "Guy Thomas" <guy@computerperformance.co.uk> wrote in message > news:uPHIT%23dqHHA.4768@TK2MSFTNGP02.phx.gbl... >>I have checked help get-eventlog, and can find no reference to a -computer >>or -computerName parameter. >> >> Question: >> Is there any way that PowerShell can interrogate the Eventlogs on another >> machine? >> >> Guy >> > |
| | #5 (permalink) |
| Guest | Re: Get-eventlog Guy Thomas wrote: > Fantastic! > > Another magic scripting moment - Thank you Brandon. > > This is the example that I am modifying for my needs. > > http://blog.sapien.com/current/2006/...filtering.html > > I keep forgetting about the Select .. -query constructions. > > What I never forget is the gulf between my clunky amateur efforts and the > elegance and efficiency of what you Professionals can achieve. > > Guy > > > > > > > > "Brandon Shell" <tshell.mask@gmail.com> wrote in message > news:enQqvzeqHHA.3228@TK2MSFTNGP03.phx.gbl... >> I also did a search using: >> http://bsonposh.com/modules/wordpress/?page_id=13 (Google Blog Search I >> created) >> >> Found some WMI examples as well: >> http://blog.sapien.com/current/2006/...filtering.html >> http://thepowershellguy.com/blogs/po...fic-words.aspx >> >> There are numerous others as well. >> >> "Guy Thomas" <guy@computerperformance.co.uk> wrote in message >> news:uPHIT%23dqHHA.4768@TK2MSFTNGP02.phx.gbl... >>> I have checked help get-eventlog, and can find no reference to a -computer >>> or -computerName parameter. >>> >>> Question: >>> Is there any way that PowerShell can interrogate the Eventlogs on another >>> machine? >>> >>> Guy >>> > > It's too bad the current version of Get-Eventlog doesn't support a remote computer, without resorting to some .NET hacking. But that's where WMI comes in which is why I wrote the blog entries. I'm glad you found them helpful. -- Jeffery Hicks SAPIEN Technologies - Scripting, Simplified. blog: http://blog.SAPIEN.com Community: http://www.scriptinganswers.com Training: http://www.ScriptingTraining.com Books: http://www.SAPIENPress.com Editor: http://www.primalscript.com Tools: http://www.scriptingoutpost.com "Those who forget to script it are doomed to repeat it." |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Security EventLog | floyd | VB Script | 0 | 2 Weeks Ago 11:39 AM |
| question to get-eventlog | André | PowerShell | 16 | 01-18-2008 04:47 AM |
| How to add new records to EventLog? | David Kriz | PowerShell | 2 | 01-12-2008 03:47 AM |
| can't access XP eventlog - why | Andy W. | Vista security | 0 | 06-12-2007 01:11 AM |
| get eventlog remote and newest | Sanders | PowerShell | 6 | 02-15-2007 09:36 PM |