# Scan for bloatware without removing - Report what WOULD be removed # Run as Administrator (recommended for full results) #Requires -RunAsAdministrator param( [Parameter(Mandatory=$false)] [ValidateSet('All', 'HP', 'Lenovo', 'ASUS', 'Dell')] [string]$Manufacturer = 'All' ) $ErrorActionPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue' Write-Host "========================================" -ForegroundColor Cyan Write-Host "Bloatware Scan Report" -ForegroundColor Cyan Write-Host "========================================" -ForegroundColor Cyan Write-Host "Manufacturer Filter: $Manufacturer" Write-Host "Generated: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')" Write-Host "" # Define what to look for $Patterns = @{ "HP" = @( 'HP.*Support.*Assistant', 'HP.*Alerts', 'HPControlledShutdown', 'HP.*Cloud.*Recover', 'HP.*Client.*Services', 'HP.*Quickdrop', 'HP.*Photo.*Creations', 'HP.*Security.*Update', 'HPIASystemAgent', 'HP.*Wireless.*Assistant', 'HP.*Print.*Library', 'HPDeskjet.*', 'HPOfficejet.*', 'HPPhotosmart.*', 'HPEnvy.*', 'HPLaserJet.*' ) "Lenovo" = @( 'Lenovo.*Settings', 'Lenovo.*Vantage', 'Lenovo.*Companion', 'Lenovo.*PowerManagement', 'Lenovo.*SystemUpdate', 'Lenovo.*UltraCharger', 'Lenovo.*Battery', 'Lenovo.*Nerve', 'Lenovo.*FusionEngine', 'Lenovo.*OneKey.*Theater', 'Lenovo.*OneKey.*Optimizer', 'LenovoLauncher', 'LenovoEasyCamera', 'PSREF' ) "ASUS" = @( 'ASUS.*Live.*Update', 'ASUS.*WebStorage', 'ASUS.*Gamer.*OSD', 'ASUS.*Ambient', 'ASUS.*FX', 'ASUS.*Splendid', 'ASUS.*Smart.*Gesture', 'ASUS.*Safe.*Face', 'ASUS.*Keyboard', 'ASUS.*Touchpad', 'ASUS.*Turbo', 'ASUS.*GameVisual', 'ASUS.*Controller', 'ASUSSMS', 'ASUS.*Sonic.*Studio' ) "Dell" = @( 'Dell.*Update', 'DellSystemDetect', 'DellClientManagementService', 'Dell.*Backup', 'Dell.*Dock', 'Dell.*Display.*Manager', 'Dell.*Easy.*Access', 'Dell.*Foundation.*Services', 'Dell.*SupportAssist', 'Dell.*SupportAssistRemediation', 'Dell.*Optimizer', 'DellPowerManager', 'Dell.*Command.*Update', 'Alienware.*' ) } $GlobalResults = @{ InstalledApps = @() Services = @() ScheduledTasks = @() Directories = @() RegistryEntries = @() AppxPackages = @() } $MfgsToCheck = if ($Manufacturer -eq 'All') { $Patterns.Keys } else { @($Manufacturer) } # ==================== INSTALLED APPLICATIONS ==================== Write-Host "[*] INSTALLED APPLICATIONS" -ForegroundColor Yellow Write-Host "-" * 40 $AppCount = 0 foreach ($Mfg in $MfgsToCheck) { $MfgCount = 0 Write-Host "" Write-Host " ${Mfg}:" -ForegroundColor Cyan foreach ($Pattern in $Patterns[$Mfg]) { try { $Apps = Get-WmiObject -Class Win32_Product -Filter "Name LIKE '$Pattern'" -ErrorAction SilentlyContinue if ($Apps) { foreach ($App in $Apps) { Write-Host " - $($App.Name)" -ForegroundColor Red Write-Host " Version: $($App.Version)" Write-Host " Installed: $($App.InstallDate)" $GlobalResults.InstalledApps += @{Manufacturer = $Mfg; Name = $App.Name; Version = $App.Version } $MfgCount++ $AppCount++ } } } catch { } } if ($MfgCount -eq 0) { Write-Host " [+] None found" -ForegroundColor Green } } # ==================== APPX PACKAGES ==================== Write-Host "" Write-Host "[*] APPX PACKAGES (Windows Store Apps)" -ForegroundColor Yellow Write-Host "-" * 40 $AppxCount = 0 foreach ($Mfg in $MfgsToCheck) { $MfgAppx = Get-AppxPackage -Name "*$Mfg*" -AllUsers -ErrorAction SilentlyContinue if ($MfgAppx) { Write-Host "" Write-Host " ${Mfg}:" -ForegroundColor Cyan foreach ($App in $MfgAppx) { Write-Host " - $($App.Name)" -ForegroundColor Red $GlobalResults.AppxPackages += @{Manufacturer = $Mfg; Name = $App.Name } $AppxCount++ } } } if ($AppxCount -eq 0) { Write-Host " [+] No AppxPackages found" -ForegroundColor Green } # ==================== SERVICES ==================== Write-Host "" Write-Host "[*] SERVICES" -ForegroundColor Yellow Write-Host "-" * 40 $ServicePatterns = @{ "HP" = @('hpsysdrv', 'HPDrvMaintSvc') "Lenovo" = @('LenovoCOMSvc', 'LenovoUpdate', 'LenovoWifiDisplayService', 'lolmsvc', 'LenovoEasyPlus') "ASUS" = @('ASUSLinkNear', 'ASUSLinkRemote', 'ASUSWebStorage', 'ASUSGiftBox', 'ArmouryCrate', 'asComSvc') "Dell" = @('DellClientManagementService', 'DellSystemDetect', 'DSAService', 'DellDataTransport', 'DellSSDMonitor') } $ServiceCount = 0 foreach ($Mfg in $MfgsToCheck) { $MfgServices = 0 Write-Host "" Write-Host " ${Mfg}:" -ForegroundColor Cyan foreach ($ServiceName in $ServicePatterns[$Mfg]) { try { $Svc = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue if ($Svc) { $Status = $Svc.Status $Color = if ($Status -eq 'Running') { 'Red' } else { 'Yellow' } Write-Host " - $($Svc.Name) [$Status]" -ForegroundColor $Color Write-Host " Display Name: $($Svc.DisplayName)" $GlobalResults.Services += @{Manufacturer = $Mfg; Name = $Svc.Name; Status = $Status } $MfgServices++ $ServiceCount++ } } catch { } } if ($MfgServices -eq 0) { Write-Host " [+] No services found" -ForegroundColor Green } } # ==================== SCHEDULED TASKS ==================== Write-Host "" Write-Host "[*] SCHEDULED TASKS" -ForegroundColor Yellow Write-Host "-" * 40 $TaskCount = 0 foreach ($Mfg in $MfgsToCheck) { $MfgTasks = Get-ScheduledTask -TaskPath "*$Mfg*" -ErrorAction SilentlyContinue if ($MfgTasks) { Write-Host "" Write-Host " ${Mfg}:" -ForegroundColor Cyan foreach ($Task in $MfgTasks) { Write-Host " - $($Task.TaskName)" -ForegroundColor Red Write-Host " Path: $($Task.TaskPath)" Write-Host " State: $($Task.State)" $GlobalResults.ScheduledTasks += @{Manufacturer = $Mfg; Name = $Task.TaskName; Path = $Task.TaskPath } $TaskCount++ } } } if ($TaskCount -eq 0) { Write-Host " [+] No scheduled tasks found" -ForegroundColor Green } # ==================== DIRECTORIES ==================== Write-Host "" Write-Host "[*] INSTALLATION DIRECTORIES" -ForegroundColor Yellow Write-Host "-" * 40 $DirPatterns = @{ "HP" = @('C:\Program Files\HP', 'C:\Program Files (x86)\HP', 'C:\Program Files\Hewlett-Packard', 'C:\Program Files (x86)\Hewlett-Packard') "Lenovo" = @('C:\Program Files\Lenovo', 'C:\Program Files (x86)\Lenovo', 'C:\ProgramData\Lenovo') "ASUS" = @('C:\Program Files\ASUS', 'C:\Program Files (x86)\ASUS', 'C:\ProgramData\ASUS') "Dell" = @('C:\Program Files\Dell', 'C:\Program Files (x86)\Dell', 'C:\ProgramData\Dell', 'C:\ProgramData\SupportAssist') } $DirCount = 0 foreach ($Mfg in $MfgsToCheck) { $MfgDirs = 0 Write-Host "" Write-Host " ${Mfg}:" -ForegroundColor Cyan foreach ($Dir in $DirPatterns[$Mfg]) { if (Test-Path $Dir) { $Size = (Get-ChildItem -Path $Dir -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).Sum $SizeGB = [math]::Round($Size / 1GB, 2) Write-Host " - $Dir" -ForegroundColor Red Write-Host " Size: $SizeGB GB" $GlobalResults.Directories += @{Manufacturer = $Mfg; Path = $Dir; SizeGB = $SizeGB } $MfgDirs++ $DirCount++ } } if ($MfgDirs -eq 0) { Write-Host " [+] No directories found" -ForegroundColor Green } } # ==================== SUMMARY ==================== Write-Host "" Write-Host "========================================" -ForegroundColor Cyan Write-Host "SUMMARY" -ForegroundColor Cyan Write-Host "========================================" -ForegroundColor Cyan Write-Host "" Write-Host "Total Items Found:" -ForegroundColor Cyan Write-Host " Installed Applications: $AppCount" -ForegroundColor $(if ($AppCount -gt 0) { 'Red' } else { 'Green' }) Write-Host " AppxPackages: $AppxCount" -ForegroundColor $(if ($AppxCount -gt 0) { 'Red' } else { 'Green' }) Write-Host " Services: $ServiceCount" -ForegroundColor $(if ($ServiceCount -gt 0) { 'Red' } else { 'Green' }) Write-Host " Scheduled Tasks: $TaskCount" -ForegroundColor $(if ($TaskCount -gt 0) { 'Red' } else { 'Green' }) Write-Host " Directories: $DirCount" -ForegroundColor $(if ($DirCount -gt 0) { 'Red' } else { 'Green' }) Write-Host "" $TotalItems = $AppCount + $AppxCount + $ServiceCount + $TaskCount + $DirCount if ($TotalItems -eq 0) { Write-Host "[+] CLEAN: No bloatware detected!" -ForegroundColor Green } else { Write-Host "[-] BLOATWARE DETECTED: $TotalItems items" -ForegroundColor Red Write-Host "" Write-Host "Next Steps:" -ForegroundColor Yellow Write-Host " 1. Review items above" Write-Host " 2. Run: powershell -ExecutionPolicy Bypass -File 'Remove-AllBloat.ps1'" Write-Host " 3. Verify with: powershell -ExecutionPolicy Bypass -File 'Verify-Removal.ps1'" } Write-Host "" Write-Host "[*] Scan complete."