Audit Startup Items
Category: Performance Optimization
Lists all user and machine startup items from the registry and Startup folders for performance tuning or malware hunting.
Write-Host "Registry - HKLM Run:" -ForegroundColor Cyan
Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Run' | ForEach-Object {
$_.PSObject.Properties | ForEach-Object { "$($_.Name): $($_.Value)" }
}
Write-Host "`nRegistry - HKCU Run:" -ForegroundColor Cyan
Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run' | ForEach-Object {
$_.PSObject.Properties | ForEach-Object { "$($_.Name): $($_.Value)" }
}
Write-Host "`nStartup Folder Items:" -ForegroundColor Cyan
$paths = @(
"$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup",
"$env:ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp"
)
foreach ($path in $paths) {
Get-ChildItem -Path $path -Filter *.lnk -ErrorAction SilentlyContinue | Select-Object Name, FullName
}
Comments
Log in to leave a comment.