TALLY SERVER FULL OPTIMIZATION SCRIPT # Windows Server 2019
?? IS SCRIPT KE BENEFITS
? Windows Defender properly optimized
? Tally folders safe
? Processes excluded
? High performance mode enabled
? Background noise reduced
? Temp files cleaned
# =========================================
# TALLY SERVER FULL OPTIMIZATION SCRIPT
# Windows Server 2019
# =========================================
Write-Host "Starting Tally Optimization..." -ForegroundColor Cyan
# -----------------------------
# 1. Enable Windows Defender (Safe Mode)
# -----------------------------
Write-Host "Configuring Windows Defender..." -ForegroundColor Yellow
Set-MpPreference -DisableRealtimeMonitoring $false
# -----------------------------
# 2. Add Exclusion Paths
# -----------------------------
Write-Host "Adding Tally folder exclusions..." -ForegroundColor Yellow
Add-MpPreference -ExclusionPath "C:\Tally" -ErrorAction SilentlyContinue
Add-MpPreference -ExclusionPath "D:\TallyData" -ErrorAction SilentlyContinue
# -----------------------------
# 3. Add Exclusion Processes
# -----------------------------
Write-Host "Adding Tally process exclusions..." -ForegroundColor Yellow
Add-MpPreference -ExclusionProcess "tally.exe" -ErrorAction SilentlyContinue
Add-MpPreference -ExclusionProcess "tallygatewayserver.exe" -ErrorAction SilentlyContinue
Add-MpPreference -ExclusionProcess "tallyscheduler.exe" -ErrorAction SilentlyContinue
# -----------------------------
# 4. Set High Performance Power Plan
# -----------------------------
Write-Host "Setting High Performance Power Plan..." -ForegroundColor Yellow
powercfg -setactive SCHEME_MIN
# -----------------------------
# 5. Stop unnecessary services (safe cleanup)
# -----------------------------
Write-Host "Stopping non-essential services..." -ForegroundColor Yellow
$services = @(
"SysMain",
"DiagTrack"
)
foreach ($svc in $services) {
$service = Get-Service -Name $svc -ErrorAction SilentlyContinue
if ($service -and $service.Status -eq "Running") {
Stop-Service -Name $svc -Force -ErrorAction SilentlyContinue
}
}
# -----------------------------
# 6. Clean temporary files
# -----------------------------
Write-Host "Cleaning temporary files..." -ForegroundColor Yellow
Remove-Item "C:\Windows\Temp\*" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "$env:TEMP\*" -Recurse -Force -ErrorAction SilentlyContinue
# -----------------------------
# DONE
# -----------------------------
Write-Host "======================================" -ForegroundColor Green
Write-Host "TALLY OPTIMIZATION COMPLETED SUCCESSFULLY" -ForegroundColor Green
Write-Host "PLEASE RESTART SERVER FOR BEST PERFORMANCE" -ForegroundColor Green
Write-Host "======================================" -ForegroundColor Green
Comments
Post a Comment