Copy-Item ${PSScriptRoot}\Wef-Abonelikler\windows-event-channels\CustomEventChannels.dll "$env:windir\system32"
    Copy-Item ${PSScriptRoot}\Wef-Abonelikler\windows-event-channels\CustomEventChannels.man "$env:windir\system32"

    Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Installing Custom Event Channels Manifest..."
    wevtutil im "c:\windows\system32\CustomEventChannels.man"
    Write-Host "Resizing Channels to 4GB..."
    $xml = wevtutil el | select-string -pattern "WEC"
    foreach ($subscription in $xml) { wevtutil sl $subscription /ms:4294967296 }

    Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Starting the Windows Event Collector Service..."
    net start wecsvc

    Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Creating custom event subscriptions..."
    cd ${PSScriptRoot}\WEF-Abonelikler\wef-subscriptions
    cmd /c "for /r %i in (*.xml) do wecutil cs %i"

    Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Enabling custom event subscriptions..."
    cmd /c "for /r %i in (*.xml) do wecutil ss %~ni /e:true"

    Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Enabling WecUtil Quick Config..."
    wecutil qc /q:true