Databases Reference
In-Depth Information
The following example uses the remote hostname
PowerServer3
(see Figure 6-10):
Get-EventLog -computerName PowerServer3 -list
Figure 6-10
In other examples of
Get
-
EventLog
shownlaterinthischapter,youcansimplyadd''-
computerName
PowerServer3
'' to see the results on the remote computer PowerServer3.
If you would like to query all the entries in the Application event log or the Windows PowerShell log,
all you have to do is pass the log name as a parameter. Execute the following commands, as shown in
Figure 6-11 and Figure 6-12:
Get-EventLog -LogName "Application"
Get-EventLog -LogName "Windows PowerShell"
Figure 6-11
As you know now, the
Get-Member
cmdlet provides all the methods and properties of any cmdlet.
Therefore, you could find information about
Get
-
Eventlog
by executing the following command (see
Figure 6-13):
Get-Eventlog -LogName "Application" -newest 1 | Get-Member | sort MemberType
Search WWH ::
Custom Search