Move Event Viewer log files to another location - Windows Server (2024)

  • Article

This article describes how to move Windows Server 2016 and Windows Server 2019 Event Viewer log files to another location on the hard disk.

Applies to: Windows Server 2016, Windows Server 2019
Original KB number: 315417

Summary

Windows Server records events in the following logs:

  • Application log

    The application log contains events that are logged by programs. Events that are written to the application log are determined by the developers of the software program.

  • Security log

    The security log contains events such as valid and invalid logon attempts. It also contains events that are related to resource use, for example, when you create, open, or delete files. You must be logged on as an administrator or as a member of the Administrators group to turn on, to use, and to specify which events are recorded in the security log.

  • System log

    The system log contains events that are logged by Windows system components. These events are predetermined by Windows.

  • Directory Service log

    The Directory Service log contains Active Directory-related events. This log is available only on domain controllers.

  • DNS Server log

    The DNS Server log contains events that are related to the resolution of DNS names to or from Internet protocol (IP) addresses. This log is available only on DNS servers.

  • File Replication Service log

    The File Replication Service log contains events that are logged during the replication process between domain controllers. This log is available only on domain controllers.

By default, Event Viewer log files use the .evt extension and are located in the %SystemRoot%\System32\winevt\Logs folder.

Log file name and location information is stored in the registry. You can edit this information to change the default location of the log files. You may want to move log files to another location if you require more disk space in which to log data.

Create an event log folder in another location

Create a folder where you want to store the event logs in your local drive and assign correct permissions. Here are the steps:

  1. Create a folder (for example, C:\EventLogs).

  2. Right-click the folder and select Properties.

  3. Select the Security tab, and then select Advanced for special permissions or advanced settings.

    Note

    The folder has "inheritance" enabled by default.

  4. Select Change to change the Owner to SYSTEM, and then select Disable Inheritance as follows:

    Move Event Viewer log files to another location - Windows Server (1)

    You'll be prompted to convert or remove inherited permissions. Select Convert inherited permissions into explicit permissions on this object, and you'll see the same permissions explicitly set on the folder.

    Note

    To create subfolders for the logs, check the Replace all child object permission entries with inheritable permissions entries from this object option. The permissions set at the parent level are applied to all subfolders and files.

  5. Adjust permissions so that the folder is assigned the correct permissions and check the Applies to column. These permissions should be the same as the advanced permissions of the default folder (%SystemRoot%\System32\winevt\Logs) that stores the Event Viewer logs. Make sure that the Authenticated Users only have Read permission for This folder and subfolders.

    Move Event Viewer log files to another location - Windows Server (2)

    Note

    To add the EventLog user, go to the Security tab of the properties dialog box and follow these steps:

    1. Select Edit > Add.
    2. Select Locations, select the local computer name, and then select OK.
    3. Type NT SERVICE\EventLog in Enter the object names to select and select Check Names. The name should be resolved to EventLog. Select OK to finish.

    Make sure Full Control is selected under Permissions for EventLog for the EventLog user.

Move Event Viewer log files to another location

You can move the log files to the created folder by using the Event Viewer as follows:

  1. Open the Event Viewer.

  2. Right-click the log name (for example, System) under Windows Logs in the left pane and select Properties.

  3. Change the Log path value to the location of the created folder and leave the log file name at the end of the path (for example, C:\EventLogs\System.evtx).

    Move Event Viewer log files to another location - Windows Server (3)

  4. Select Clear Log, and then select Save and Clear to retain the event log files in a different location.

  5. Select Apply > OK.

    Note

    Check the folder you moved the event logs to. If the event logs are not in the folder, restart the system.

You can confirm that the log path has been updated by using Registry Editor. For example, go to the following registry path and check the Value data of the File value.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\System

Move Event Viewer log files by using Powershell

It is possible to utilize Powershell for this purpose. In the sample, Security event logs will be migrated to C:\Logs:

$originalFolder = "$env:SystemRoot\system32\winevt\Logs"$targetFolder = "C:\logs"$logName = "Security"$originalAcl = Get-Acl -Path $originalFolder -Audit -AllCentralAccessPoliciesSet-Acl -Path $targetFolder -AclObject $originalAcl -ClearCentralAccessPolicy$targetAcl = Get-Acl -Path $targetFolder -Audit -AllCentralAccessPolicies$targetAcl.SetOwner([System.Security.Principal.NTAccount]::new("SYSTEM"))New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\EventLog\$logName" -Name "AutoBackupLogFiles" -Value "1" -PropertyType "DWord"New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\EventLog\$logName" -Name "Flags" -Value "1" -PropertyType "DWord"Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\EventLog\$logName" -Name "File" -Value "$targetFolder\$logName.evtx"

References

For more information about how to view and manage logs in the Event Viewer, see How to delete corrupt Event Viewer Log files. To learn more about general Event Viewer usage, select the Action menu in Event Viewer, and then select Help.

Move Event Viewer log files to another location - Windows Server (2024)

FAQs

Move Event Viewer log files to another location - Windows Server? ›

Open the Event Viewer. Right-click the log name (for example, System) under Windows Logs in the left pane and select Properties. Change the Log path value to the location of the created folder and leave the log file name at the end of the path (for example, C:\EventLogs\System.

How do I export Event Viewer logs from Windows Server? ›

How to export event viewer logs?
  1. Open Event Viewer (Run → eventvwr. ...
  2. Locate the log to be exported.
  3. Select the logs that you want to export, right-click on them and select "Save All Events As".
  4. Enter a file name that includes the log type and the server it was exported from.
  5. Save as a CSV (Comma Separated Value) file.

How to import Event Viewer logs? ›

You can import the logs from remote machines using FTP or SFTP protocol. You can schedule the import of logs periodically both from local and remote machines. The type of event logs that can be imported and reported on includes Application, Security, System, Directory Service, DNS Server, or File Replication Service.

Where are Windows Server event logs stored? ›

Windows event log location is C:\WINDOWS\system32\config\ folder. Event logs can be checked with the help of 'Event Viewer' to keep track of issues in the system.

How do I change the location of IIS log files? ›

Open IIS Manager from Administrative Tools and click on the Default Web Site. Double-click the Logging icon. Type in the path to the new log directory that you want to use, or click Browse and navigate to it.

How do I move Event Viewer logs? ›

Open the Event Viewer. Right-click the log name (for example, System) under Windows Logs in the left pane and select Properties. Change the Log path value to the location of the created folder and leave the log file name at the end of the path (for example, C:\EventLogs\System. evtx).

How do I grab Windows event logs? ›

To collect event logs from Windows, follow these steps:
  1. Click “Start,” then “Run,” then “eventvwr. msc.” This will open the Event Viewer.
  2. Next, go to “Windows Logs,” then “Application, Security, and System”
  3. Filter the current log by dates.
  4. Click “Save All Event As…”
  5. Save the logs.
Mar 17, 2021

How do I view Event Viewer logs on another computer? ›

Remote Event Log Viewing
  1. Step 1: Open Event Viewer as Admin. event.png369×614 19.6 KB. ...
  2. Step 2: Connect to Another Computer. Right Click on the Event Viewer (Local) header and select Connect to another computer.
  3. Step 3: Enter the Remote Computer Name or IP. ...
  4. Step 4: Browse the Remote Computer Logs.
Mar 7, 2016

How do I import custom view Event Viewer? ›

How to Use. Find the Custom View in the list, download it to the computer, or copy the content to Notepad and save the file as an . xml , then open Event Viewer, right click on the Custom Views in the top left pane, and select Import Custom View...

Where are event log dump files stored? ›

Normally it is in C:\Windows\memory. dmp (if C: is the system drive). We can find the dump file according to the timeline.

Where are event logs stored Windows Server 2012? ›

In Windows Server Essentials 2012 and 2012 R2, the location of the log files is under %programdata%MicrosoftWindows ServerLogs .

How to get old Event Viewer logs? ›

Windows stores event logs in the C:\WINDOWS\system32\config\ folder. If an application such as Microsoft Word crashes, then the Windows event log will create a log entry about the issue, the application name, and why it crashed. It's also possible but unlikely data recovery software could undelete them.

How do I change the location of a database log file? ›

Use SQL Server Management Studio
  1. In Object Explorer, right-click on your server and select Properties.
  2. In the left panel on that Properties page, select the Database settings tab.
  3. In Database default locations, view the current default locations for new data files and new log files.
Mar 25, 2024

Where does IIS store its logs? ›

IIS Logs Location: On a standard Windows Server, IIS log files are found at %SystemDrive%\inetpub\logs\LogFiles by default.

How do I change the location of audit log? ›

Information
  1. Option 1: With a configuration change the location of all Sitefinity logs can be changed by moving all logs to a database using ELMAH error logging. ...
  2. Option 2: The Audit module itself can log its data not to a file in Sitefinity logs, but to an external system called Kibana.
Oct 17, 2019

How to get logs from Windows server? ›

Click Start > Control Panel > System and Security > Administrative Tools. Double-click Event Viewer. Select the type of logs that you wish to review (ex: Windows Logs)

How to get Event Viewer logs using cmd? ›

Start Windows Event Viewer through the command line

To open a command prompt, click Start , click All Programs , click Accessories and then click Command Prompt . As a shortcut you can press the Windows key + R to open a run window, type cmd to open a, command prompt window. Type eventvwr and click enter.

How do I export an EVTX file? ›

Information
  1. Open the Start menu and search for “Event Viewer”.
  2. When the Event Viewer opens, expand Windows Logs.
  3. Right-click Application and select Save All Events As.
  4. Save the log in the . evtx format.
  5. Right-click System and select Save All Events As.
  6. Save the log in the . evtx format.
Dec 12, 2023

Where are the event log files in Windows Server 2012 R2? ›

In Windows Server Essentials 2012 and 2012 R2, the location of the log files is under %programdata%MicrosoftWindows ServerLogs .

Top Articles
Save Money on Digital Storage With These Google Drive Tricks
9 Best XM Group Alternatives of 2024
Room Background For Zepeto
Canary im Test: Ein All-in-One Überwachungssystem? - HouseControllers
Select The Best Reagents For The Reaction Below.
Buckaroo Blog
Bbc 5Live Schedule
Tight Tiny Teen Scouts 5
Full Range 10 Bar Selection Box
Culos Grandes Ricos
Notisabelrenu
Koop hier ‘verloren pakketten’, een nieuwe Italiaanse zaak en dit wil je ook even weten - indebuurt Utrecht
Samsung Galaxy S24 Ultra Negru dual-sim, 256 GB, 12 GB RAM - Telefon mobil la pret avantajos - Abonament - In rate | Digi Romania S.A.
Magic Mike's Last Dance Showtimes Near Marcus Cedar Creek Cinema
Craighead County Sheriff's Department
Ups Access Point Lockers
Pjs Obits
Azpeople View Paycheck/W2
Adt Residential Sales Representative Salary
Wbiw Weather Watchers
Https Paperlesspay Talx Com Boydgaming
U Of Arizona Phonebook
University Of Michigan Paging System
Prep Spotlight Tv Mn
Bento - A link in bio, but rich and beautiful.
Belledelphine Telegram
4 Methods to Fix “Vortex Mods Cannot Be Deployed” Issue - MiniTool Partition Wizard
Bra Size Calculator & Conversion Chart: Measure Bust & Convert Sizes
Meijer Deli Trays Brochure
How To Improve Your Pilates C-Curve
Southtown 101 Menu
Ehome America Coupon Code
Sun Haven Pufferfish
Σινεμά - Τι Ταινίες Παίζουν οι Κινηματογράφοι Σήμερα - Πρόγραμμα 2024 | iathens.gr
Gas Prices In Henderson Kentucky
Laurin Funeral Home | Buried In Work
Poe Flameblast
RALEY MEDICAL | Oklahoma Department of Rehabilitation Services
Anya Banerjee Feet
Author's Purpose And Viewpoint In The Dark Game Part 3
All-New Webkinz FAQ | WKN: Webkinz Newz
Traumasoft Butler
Charli D'amelio Bj
Guided Practice Activities 5B-1 Answers
Fedex Passport Locations Near Me
Stosh's Kolaches Photos
Hillsborough County Florida Recorder Of Deeds
Crigslist Tucson
SF bay area cars & trucks "chevrolet 50" - craigslist
1Tamilmv.kids
Cool Math Games Bucketball
Latest Posts
Article information

Author: Kelle Weber

Last Updated:

Views: 6723

Rating: 4.2 / 5 (53 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Kelle Weber

Birthday: 2000-08-05

Address: 6796 Juan Square, Markfort, MN 58988

Phone: +8215934114615

Job: Hospitality Director

Hobby: tabletop games, Foreign language learning, Leather crafting, Horseback riding, Swimming, Knapping, Handball

Introduction: My name is Kelle Weber, I am a magnificent, enchanting, fair, joyous, light, determined, joyous person who loves writing and wants to share my knowledge and understanding with you.