|
Guy recommends :
Find out which of your VMs are a waste of space and which VMs need more resources.
|
PowerShell Scripting with Get-EventlogIntroduction to Scripting Eventlog on a Remote MachineChallenge, to interrogate logs on a remote machine. PowerShell Eventlog Topics♣ PowerShell Pre-requisites and ChecklistIn the case of Windows 7 and Server 2008, you don't need to download any extra files, just 'Add Feature' Windows PowerShell. However, for older operating systems, installing can be confusing because there are different versions of PowerShell for XP, Windows Server 2003 and Vista. For such legacy systems only, you need to download PowerShell from Microsoft's site. Once you have installed PowerShell 2.0, I recommend choosing the ISE (Integrated Scripting Engine) version, it will save you buying a text editor. Example 1: Eventlog with System.DiagnosticsLearning PointsNote 1: New-Object creates an instance of system.diagnostics. In particular an eventLog instance Note 2: I have used variables to control the output, $Log, $Computer and $ID. Important: Please amend $Computer = "LocalHost" to the name of the remote computer. # PowerShell script to list the eventlogs on another computer $Objlog = New-Object system.diagnostics.eventLog($Log, $Computer) More workIntroduce an $array and a loop to interrogate a batch of computers. Guy Recommends:
The Free IP Address Tracker (IPAT)
|
||||
Custom Search
|
Guy Recommends: WMI Monitor and It's Free!
|
|
Home Copyright © 1999-2012 Computer Performance LTD All rights reserved Please report a broken link, or an error. | |