fbpx Back Up an Event Log | Windows PowerShell, Windows Server | HostingUltraso.com
24/7/365 Support

Back Up an Event Log

Problem

You want to store the information in an event log in a file for storage or later review.

Solution

To store event log entries in a file, use the GetEventLog cmdlet to retrieve the entries in the event log, and then pipe them to the ExportCliXml cmdlet to store them in a file.

GetEventLog System | ExportCliXml c:\temp\SystemLogBackup.clixml

Discussion

Once you’ve exported the events from an event log, you can archive them, or use the ImportCliXml cmdlet to review them on any machine that has PowerShell installed:

PS >$archivedLogs = ImportCliXml c:\temp\SystemLogBackup.clixml

PS >$archivedLogs | Group Source

Count Name
Group

856 Service Control Manager
{LEEDESK, LEEDESK, LEEDESK, LEEDESK...

640 TermServDevices
{LEEDESK, LEEDESK, LEEDESK, LEEDESK...

91 Print
{LEEDESK, LEEDESK, LEEDESK, LEEDESK...

100 WMPNetworkSvc
{LEEDESK, LEEDESK, LEEDESK, LEEDESK...

123 Tcpip
{LEEDESK, LEEDESK, LEEDESK, LEEDESK...

(...)

For more information about the GetEventLog cmdlet, type GetHelp GetEventLog. For more information about the ExportCliXml and ImportCliXml cmdlets, type GetHelp ExportCliXml and GetHelp ImportCliXml, respectively.

Help Category:

Get Windows Dedicated Server

Only reading will not help you, you have to practice it! So get it now.

Processor RAM Storage Server Detail
Processor Intel Atom C2350 1.7 GHz 2c/2t RAM 4 GB DDR3 Storage 1× 1 TB (HDD SATA) Server Detail Configure Server
Processor Intel Atom C2350 1.7 GHz 2c/2t RAM 4 GB DDR3 Storage 1× 128 GB (SSD SATA) Server Detail Configure Server
Processor Intel Atom C2750 2.4 GHz 8c/8t RAM 8 GB DDR3 Storage 1× 1 TB (HDD SATA) Server Detail Configure Server
Processor Intel Xeon E3-1230 v2 3.3 GHz 4c/8t RAM 16 GB DDR3 Storage 1× 256 GB (SSD SATA) Server Detail Configure Server
Processor Intel Atom C2350 1.7 GHz 2c/2t RAM 4 GB DDR3 Storage 1× 250 GB (SSD SATA) Server Detail Configure Server

What Our Clients Say