09.02.2014 Views

Windows sysinternals

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

192 Part II Usage Guide<br />

on the network, and that the search might be time-consuming on a large or bandwidthconstrained<br />

network.<br />

PsLoggedOn’s definition of a locally logged-on user is a user that has its profile loaded into<br />

the registry. When the user’s profile is loaded, the user’s security identifier (SID) appears as a<br />

subkey under HKEY_USERS. PsLoggedOn looks at the last-write time stamp under a subkey<br />

of that SID key as an approximation of the user’s logon time. The logon time reported will be<br />

accurate in most cases but is not authoritative. For a more complete and accurate listing of<br />

logon sessions on a computer, see the LogonSessions utility, described in Chapter 8, “Security<br />

Utilities.”<br />

PsLogList<br />

PsLogList displays records from the <strong>Windows</strong> event logs of the local computer or of remote<br />

computers. You can filter the output based on time stamp, source, ID, type, or other criteria.<br />

PsLogList also lets you export log records to a *.evt file, read from a saved *.evt file, or clear<br />

an event log.<br />

Without parameters, PsLogList dumps all records from the System event log on the local<br />

computer. To view records from a different event log, just name it on the command line. For<br />

example, the following command lines dump records from the Application log and from the<br />

<strong>Windows</strong> PowerShell log, respectively:<br />

psloglist application<br />

psloglist "<strong>Windows</strong> Powershell"<br />

To view records from one or more remote computers, specify computer names on the<br />

command line as described at the beginning of this chapter.<br />

Every event log record includes an event source and an event ID. The event ID is used to look<br />

up and display localizable, human-readable text from a message resource DLL associated<br />

with the event source. That message text can contain placeholders for text that can vary per<br />

event (such as a file name or an IP address). That per-event text is associated with the event<br />

log record as zero or more insertion strings. Most event-viewing applications, including Event<br />

Viewer, display only the insertion strings (not the full text) when the referenced message<br />

resource DLLs are not present on the local system. This makes the text difficult to read. One<br />

of the features that distinguishes PsLogList when reading a remote event log is that it will<br />

get message text from the resource DLLs on those remote systems. However, this requires<br />

that the remote system’s default administrative share (Admin$) be enabled and accessible,<br />

that the resource DLLs be located under that directory, and that the Remote Registry service<br />

is running on that system. Before using PsLogList to gather data from remote systems, be<br />

sure that this is the case on those systems; otherwise, PsLogList will not be able to display full<br />

event text.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!