Skip to content

Instantly share code, notes, and snippets.

@filipnet
filipnet / export_wineventlog.ps1
Created April 14, 2023 09:02 — forked from iomoath/export_wineventlog.ps1
Powershell script to export Windows Events logs
# Logs to extract from server
$logArray = @("System","Security","Application", "Setup")
# Grabs the server name to append to the log file extraction
$servername = $env:computername
# Provide the path with ending "\" to store the log file extraction.
$destinationpath = "C:\WindowsEventLogs\"
# Checks the last character of the destination path. If it does not end in '\' it adds one.