Created
June 18, 2025 17:01
-
-
Save michaellwest/845bec7e03b8ee4b3a2fa87bd9c9b7b8 to your computer and use it in GitHub Desktop.
Download all log files using Sitecore PowerShell Extensions (SPE).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Function -Name Compress-Archive | |
# The archive filename will closely resemble the format of the default logfile names. | |
$archiveName = "logs.$([datetime]::Now.ToString("yyyy-MM-dd.HHmmss"))" | |
$archiveDirectory = "$($SitecoreDataFolder)\archived\" | |
$logDirectory = "$($SitecoreDataFolder)\logs\" | |
$archivePath = Join-Path -Path $archiveDirectory -ChildPath $archiveName | |
Compress-Archive -Path $logDirectory –CompressionLevel Fastest -DestinationPath $archivePath | Out-Download |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment