# PCS Toolkit - Browser Extension Audit # Lists installed extensions for Chrome, Edge, and Firefox $timestamp = Get-Date -Format "yyyy-MM-dd_HH-mm-ss" $outputFile = "$env:USERPROFILE\Desktop\BrowserExtensions_$timestamp.txt" function Log($msg) { Write-Host $msg Add-Content $outputFile $msg } Log "========================================" Log " PCS Toolkit - Browser Extensions" Log "========================================" Log "Generated: $(Get-Date)" Log "Computer: $env:COMPUTERNAME" Log "" # Chrome Log "=== GOOGLE CHROME ===" $chromePath = "$env:LOCALAPPDATA\Google\Chrome\User Data\Default\Extensions" if (Test-Path $chromePath) { Get-ChildItem $chromePath -Directory | ForEach-Object { $extId = $_.Name $manifest = Get-ChildItem $_.FullName -Recurse -Filter "manifest.json" | Select-Object -First 1 if ($manifest) { try { $json = Get-Content $manifest.FullName -Raw | ConvertFrom-Json Log " $($json.name) (v$($json.version))" Log " ID: $extId" if ($json.description) { Log " Desc: $($json.description.Substring(0, [Math]::Min(80, $json.description.Length)))..." } } catch { Log " Unknown extension: $extId" } } } } else { Log " Chrome not found or no extensions" } Log "" # Edge Log "=== MICROSOFT EDGE ===" $edgePath = "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Extensions" if (Test-Path $edgePath) { Get-ChildItem $edgePath -Directory | ForEach-Object { $extId = $_.Name $manifest = Get-ChildItem $_.FullName -Recurse -Filter "manifest.json" | Select-Object -First 1 if ($manifest) { try { $json = Get-Content $manifest.FullName -Raw | ConvertFrom-Json Log " $($json.name) (v$($json.version))" Log " ID: $extId" } catch { Log " Unknown extension: $extId" } } } } else { Log " Edge not found or no extensions" } Log "" # Firefox Log "=== MOZILLA FIREFOX ===" $firefoxPath = "$env:APPDATA\Mozilla\Firefox\Profiles" if (Test-Path $firefoxPath) { Get-ChildItem $firefoxPath -Directory | ForEach-Object { $extFile = Join-Path $_.FullName "extensions.json" if (Test-Path $extFile) { try { $json = Get-Content $extFile -Raw | ConvertFrom-Json $json.addons | Where-Object { $_.type -eq 'extension' } | ForEach-Object { Log " $($_.defaultLocale.name) (v$($_.version))" Log " ID: $($_.id)" } } catch { Log " Could not parse extensions.json" } } } } else { Log " Firefox not found" } Log "" Log "========================================" Log "AUDIT COMPLETE" Log "========================================" explorer.exe "/select,$outputFile" Read-Host "Press Enter to exit"