# keepsite.fr — Read-only Windows startup audit # Run in PowerShell (no administrator rights needed for the first block; # scheduled tasks may require an elevated prompt). # Nothing is changed: the script only lists startup entries and tasks. Write-Host "== Startup commands ==" -ForegroundColor Cyan Get-CimInstance Win32_StartupCommand | Select-Object Name, Command, Location | Sort-Object Name | Format-Table -AutoSize Write-Host "== Run keys (current user) ==" -ForegroundColor Cyan $runKeys = @( 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run', 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Run' ) foreach ($key in $runKeys) { if (Test-Path $key) { Write-Host "-- $key" Get-ItemProperty $key | Select-Object * -ExcludeProperty PS* | Format-List } } Write-Host "== Ready scheduled tasks ==" -ForegroundColor Cyan Get-ScheduledTask | Where-Object { $_.State -eq 'Ready' -and $_.TaskPath -notlike '\Microsoft\*' } | Select-Object TaskName, TaskPath | Sort-Object TaskPath | Format-Table -AutoSize Write-Host "== Disk and memory ==" -ForegroundColor Cyan Get-PSDrive -PSProvider FileSystem | Select-Object Name, @{n='UsedGB';e={[math]::Round($_.Used/1GB,1)}}, @{n='FreeGB';e={[math]::Round($_.Free/1GB,1)}} Get-CimInstance Win32_OperatingSystem | Select-Object @{n='FreeRAM_GB';e={[math]::Round($_.FreePhysicalMemory/1MB,2)}}, @{n='TotalRAM_GB';e={[math]::Round($_.TotalVisibleMemorySize/1MB,2)}} Write-Host "Done. Disable startup entries in small batches, then reboot and time the login." -ForegroundColor Green