Skip to content

Instantly share code, notes, and snippets.

@MaxRei-dev
MaxRei-dev / Reset Windows Update Agent
Last active January 18, 2024 23:03
Reset Windows Update Agent
Using this script, you can completely reset the configuration of Windows Update and clear the local update cache. The script is applicable for both workstations with Windows 11/10/8.1/7 and Windows Server 2022/2019/2016/2012 R2/2008 R2. This script helps to eliminate most typical Windows Update errors when Windows stops downloading new updates or errors appear during the update installation.
@MaxRei-dev
MaxRei-dev / cleanExchangeLogs.ps1
Last active November 11, 2021 08:00
Clean Exchange Logs
$executionPolicy = Get-ExecutionPolicy
if ($executionPolicy -ne 'RemoteSigned') {
Set-Executionpolicy RemoteSigned -Force
}
$days = 2
$IISLogPath = "C:\inetpub\logs\LogFiles\"
$ExchangeLoggingPath = "C:\Program Files\Microsoft\Exchange Server\V15\Logging\"
$ETLLoggingPath = "C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\ETLTraces\"
$ETLLoggingPath2 = "C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\Logs"