# Hata mesajlarini gizle $ErrorActionPreference = "SilentlyContinue" do { Clear-Host Write-Host "===============================================" -ForegroundColor Cyan Write-Host " KORALTURK DESTEK VE KURULUM ARACI " -ForegroundColor White -BackgroundColor DarkBlue Write-Host "===============================================" -ForegroundColor Cyan Write-Host "" Write-Host "1) Outlook Profillerini ve Sifrelerini Temizle" -ForegroundColor Yellow Write-Host "2) Koralturk Posta Kurulum Kayitlarini Yap" -ForegroundColor White Write-Host "3) Windows/Office Etkinlestirme (MAS)" -ForegroundColor Green Write-Host "0) Cikis (Pencereyi Kapat)" -ForegroundColor Red Write-Host "" $choice = Read-Host "Seciminizi yapin" switch ($choice) { "1" { Write-Host "`n[!] Outlook kapatiliyor ve temizlik basliyor..." -ForegroundColor Cyan Get-Process OUTLOOK | Stop-Process -Force # Profil Temizligi $profilesReg = "HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles" if (Test-Path $profilesReg) { Remove-Item $profilesReg -Recurse -Force Write-Host "OK: Outlook mail profilleri silindi." -ForegroundColor Green } # Credential Manager (cmdkey) Write-Host "OK: Kimlik bilgileri temizleniyor..." -ForegroundColor Gray $targets = (cmdkey /list) | ForEach-Object { if ($_ -match "Target:\s*(.+)$") { $Matches[1].Trim() } } foreach ($t in ($targets | Select-Object -Unique)) { cmdkey /delete:$t | Out-Null } # Vault Temizligi $vaults = vaultcmd /list 2>$null foreach ($line in $vaults) { if ($line -match "Vault\s+Guid:\s*({[0-9A-Fa-f-]+})") { $vg = $Matches[1] $items = vaultcmd /listcreds:$vg 2>$null foreach ($l in $items) { if ($l -match "Resource:\s*(.+)$") { $r = $Matches[1].Trim() vaultcmd /deletecreds:$vg /resource:$r | Out-Null } } } } Write-Host "`n[OK] Islem Bitti. Menuye donuluyor..." -ForegroundColor Green Start-Sleep -Seconds 2 } "2" { Write-Host "`n[!] Kayitlar uygulaniyor..." -ForegroundColor Cyan $autoDiscoverPath = "HKCU:\Software\Microsoft\Office\16.0\Outlook\AutoDiscover" $identityPath = "HKCU:\Software\Microsoft\Office\16.0\Common\Identity" if (-not (Test-Path $autoDiscoverPath)) { New-Item -Path $autoDiscoverPath -Force | Out-Null } $autoDiscoverValues = @("ExcludeExplicitO365Endpoint","ExcludeMSOutlookCom","ExcludeLastKnownGoodUrl","ExcludeHttpsRootDomain","ExcludeHttpsLookupRecursive","ExcludeSrvRecord") foreach ($name in $autoDiscoverValues) { New-ItemProperty -Path $autoDiscoverPath -Name $name -PropertyType DWord -Value 1 -Force | Out-Null } if (-not (Test-Path $identityPath)) { New-Item -Path $identityPath -Force | Out-Null } New-ItemProperty -Path $identityPath -Name "EnableADAL" -PropertyType DWord -Value 0 -Force | Out-Null Write-Host "`n[OK] Kayitlar yapildi. Menuye donuluyor..." -ForegroundColor Green Start-Sleep -Seconds 2 } "3" { Write-Host "`n[!] Etkinlestirme indiriliyor..." -ForegroundColor Green & { $psv = (Get-Host).Version.Major try { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 } catch {} $URLs = @( 'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/4fdefbc0d58befbe824440af39ed424c6386f65f/MAS/All-In-One-Version-KL/MAS_AIO.cmd', 'https://git.activated.win/Microsoft-Activation-Scripts/plain/MAS/All-In-One-Version-KL/MAS_AIO.cmd?id=4fdefbc0d58befbe824440af39ed424c6386f65f' ) foreach ($URL in $URLs | Sort-Object { Get-Random }) { try { $response = if ($psv -ge 3) { Invoke-RestMethod $URL } else { (New-Object Net.WebClient).DownloadString($URL) }; break } catch {} } if ($response) { $rand = [Guid]::NewGuid().Guid $FilePath = "$env:TEMP\MAS_$rand.cmd" Set-Content -Path $FilePath -Value "@::: $rand `r`n$response" Start-Process -FilePath "$env:ComSpec" -ArgumentList "/c """"$FilePath""""" -Wait -Verb RunAs Remove-Item -Path $FilePath } } Write-Host "`n[OK] MAS Bitti. Menuye donuluyor..." -ForegroundColor Green Start-Sleep -Seconds 1 } "0" { Write-Host "`nPencere kapatiliyor. Iyi calismalar!" -ForegroundColor Cyan Start-Sleep -Seconds 1 # Mevcut PowerShell surecini zorla kapatir Stop-Process -Id $PID } Default { Write-Host "`nGecersiz secim!" -ForegroundColor Red Start-Sleep -Seconds 1 } } } while ($true)